index xrefs 2006/08/08 17:41:24

ChemoJunChemicalMediaNavigator

ChemoJun050 (2006/08/08) Copyright 2002-2006 National Institute of Informatics, Research Organization of Information and Systems.

category:

inheritance:

instance variables:

class instance variables:

class variables:

pool variables:

instance methods:

  1. checkFilename: aFilename [actions] xrefs
     
    	self moleculeModel beInvisible.
    	self movieModel beInvisible.
    	self imageModel beInvisible.
    	self textModel beInvisible.
    	self bodyModel beInvisible.
    	self fileModel updateCurrentFileName.
    	aFilename isNil ifTrue: [^self].
    	aFilename definitelyExists ifFalse: [^self].
    	aFilename isDirectory ifTrue: [^self].
    	JunSensorUtility altDown 
    		ifFalse: 
    			[(self class isMolfile: aFilename) 
    				ifTrue: 
    					[| aReader |
    					(self builder componentAt: #moleculeModel)
    						beVisible;
    						enable.
    					aReader := self moleculeModel defaultMolFileReaderClass 
    								fileName: aFilename.
    					self moleculeModel moleculeFromReader: aReader.
    					^self]].
    	super checkFilename: aFilename
  2. fileModel [accessing] xrefs
    	fileModel isNil 
    		ifTrue: 
    			[super fileModel.
    			fileModel leftList selectBlock: ChemoJunUtility selectBlockForDirectoryContents.
    			fileModel centerList selectBlock: ChemoJunUtility selectBlockForDirectoryContents.
    			fileModel rightList selectBlock: ChemoJunUtility selectBlockForDirectoryContents].
    	^fileModel
  3. initialize [initialize-release] xrefs
    	super initialize.
    	moleculeModel := nil
  4. moleculeModel [accessing] xrefs
    	moleculeModel isNil ifTrue: [moleculeModel := ChemoJunMoleculeModel new].
    	^moleculeModel
  5. postOpenWith: aBuilder [interface opening] xrefs
     
    	| specWrapper |
    	specWrapper := aBuilder componentAt: #moleculeModel.
    	specWrapper beInvisible.
    	specWrapper widget 
    		client: self moleculeModel
    		spec: #windowSpec
    		builder: aBuilder.
    	super postOpenWith: aBuilder

class methods:

  1. copyright [copyright] xrefs
    	^'ChemoJun050 (2006/08/08) Copyright 2002-2006 National Institute of Informatics, Research Organization of Information and Systems.'
  2. example [examples] xrefs
    	"ChemoJunChemicalMediaNavigator example."
    
    	ChemoJunChemicalMediaNavigator open
  3. install [class initialization] xrefs
    	"ChemoJunChemicalMediaNavigator install."
    
    	JunFileNavigator icon16x16Table at: 'mol'
    		ifAbsentPut: [ChemoJunOpaqueImageIcons chemoJun16x16].
    	JunFileNavigator icon64x64Table at: 'mol'
    		ifAbsentPut: [ChemoJunOpaqueImageIcons chemoJun64x64].
    	JunFileNavigator icon16x16Table at: 'catalogue'
    		ifAbsentPut: [ChemoJunOpaqueImageIcons chemoJun16x16].
    	JunFileNavigator icon64x64Table at: 'catalogue'
    		ifAbsentPut: [ChemoJunOpaqueImageIcons chemoJun64x64].
    	JunFileNavigator icon16x16Table at: 'sd'
    		ifAbsentPut: [ChemoJunOpaqueImageIcons chemoJun16x16].
    	JunFileNavigator icon64x64Table at: 'sd'
    		ifAbsentPut: [ChemoJunOpaqueImageIcons chemoJun64x64].
    	^self
  4. is2dMolfile: aFilename [testing] xrefs
     
    	| aString aCollection extensionString dimensionString |
    	aString := (aFilename class splitPath: aFilename asString) last.
    	aCollection := JunStringUtility separate: aString dividers: '.'.
    	extensionString := aCollection last asLowercase.
    	aCollection size > 2 
    		ifTrue: 
    			[dimensionString := (aCollection at: aCollection size - 1) asLowercase]
    		ifFalse: [dimensionString := String new].
    	^extensionString = 'mol' and: [dimensionString = '2d']
  5. isMolfile: aFilename [testing] xrefs
     
    	| aString aCollection extensionString |
    	aString := (aFilename class splitPath: aFilename asString) last.
    	aCollection := JunStringUtility separate: aString dividers: '.'.
    	extensionString := aCollection last asLowercase.
    	^extensionString = 'mol'
  6. system [copyright] xrefs
    	^'ChemoJun'
  7. uninstall [class initialization] xrefs
    	"ChemoJunChemicalMediaNavigator uninstall."
    
    	JunFileNavigator icon16x16Table removeKey: 'mol'.
    	JunFileNavigator icon64x64Table removeKey: 'mol'.
    	JunFileNavigator icon16x16Table removeKey: 'catalogue'.
    	JunFileNavigator icon64x64Table removeKey: 'catalogue'.
    	JunFileNavigator icon16x16Table removeKey: 'sd'.
    	JunFileNavigator icon64x64Table removeKey: 'sd'.
    	^self
  8. version [copyright] xrefs
    	^'050'
  9. windowSpec [interface specs] xrefs
    	"Tools.UIPainter new openOnClass: self andSelector: #windowSpec"
    
    	<resource: #canvas>
    	^#(#{UI.FullSpec} 
    		#window: 
    		#(#{UI.WindowSpec} 
    			#label: 
    			#(#{Kernel.UserMessage} 
    				#key: #chemoJun_Chemical_Media_Navigator 
    				#defaultString: 'Chemical Media Navigator' ) 
    			#min: #(#{Core.Point} 400 500 ) 
    			#bounds: #(#{Graphics.Rectangle} 500 200 1000 800 ) 
    			#colors: 
    			#(#{UI.LookPreferences} 
    				#setBackgroundColor: #(#{Graphics.ColorValue} #white ) ) 
    			#isEventDriven: true ) 
    		#component: 
    		#(#{UI.SpecCollection} 
    			#collection: #(
    				#(#{UI.SubCanvasSpec} 
    					#layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 -282 1 ) 
    					#name: #moleculeModel 
    					#flags: 0 ) 
    				#(#{UI.SubCanvasSpec} 
    					#layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 -282 1 ) 
    					#name: #movieModel 
    					#flags: 0 ) 
    				#(#{UI.SubCanvasSpec} 
    					#layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 -282 1 ) 
    					#name: #imageModel 
    					#flags: 0 ) 
    				#(#{UI.SubCanvasSpec} 
    					#layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 -282 1 ) 
    					#name: #textModel 
    					#flags: 0 ) 
    				#(#{UI.SubCanvasSpec} 
    					#layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 -282 1 ) 
    					#name: #bodyModel 
    					#flags: 0 ) 
    				#(#{UI.ResizingSplitterSpec} 
    					#layout: #(#{Graphics.LayoutFrame} 1 0 -282 1 -1 1 -281 1 ) 
    					#name: #ResizingSplitter1 
    					#horizontal: true 
    					#minAboveSize: 300 
    					#minBelowSize: 100 
    					#aboveWidgets: 'moleculeModel movieModel imageModel textModel bodyModel' 
    					#belowWidgets: 'fileModel' ) 
    				#(#{UI.SubCanvasSpec} 
    					#layout: #(#{Graphics.LayoutFrame} 0 0 -281 1 0 1 0 1 ) 
    					#name: #fileModel 
    					#flags: 0 ) ) ) )

index xrefs