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

ChemoJunAbstractViewerController

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. boundsActivity [control defaults] xrefs
    	self flushMovementVector.
    	self sensor waitNoButton
  2. clickActivity [control defaults] xrefs
    	self flushMovementVector.
    	self model clickAt: self mouse2dPoint.
    	self sensor waitNoButton
  3. mouseMovedEvent: event [events] xrefs
     
    	self viewHasCursor 
    		ifTrue: 
    			[| state |
    			state := self model buttonState.
    			state isNil ifTrue: [JunCursors crossCursor show].
    			state = #pick ifTrue: [Cursor normal show].
    			state = #grab ifTrue: [JunCursors handCursor show].
    			state = #drag ifTrue: [JunCursors quartersCursor show].
    			state = #focus ifTrue: [JunCursors glassCursor show]]
    		ifFalse: [Cursor normal show].
    	^nil
  4. nibColor [private] xrefs
    	^ColorValue magenta
  5. nibWidth [private] xrefs
    	^3
  6. pencilActivity [control defaults] xrefs
    	| mouse gc pointCollection current previous index array4 array3 array2 points viewSize |
    	self flushMovementVector.
    	mouse := self sensor.
    	gc := self view graphicsContext.
    	gc paint: self nibColor.
    	gc lineWidth: self nibWidth.
    	gc capStyle: gc class capRound.
    	gc joinStyle: gc class joinRound.
    	pointCollection := OrderedCollection new: 1024.
    	current := previous := mouse cursorPoint.
    	pointCollection add: current.
    	index := 1.
    	array4 := Array new: 4.
    	array3 := Array new: 3.
    	array2 := Array new: 2.
    	self view displayOn: gc
    		dotBox: ((current extent: 1 @ 1) expandedBy: (self nibWidth // 2 max: 0)).
    	[mouse redButtonPressed] whileTrue: 
    			[current := mouse cursorPoint.
    			((current = previous) not and: [(current dist: previous) >= 8]) 
    				ifTrue: 
    					[pointCollection add: current.
    					index := index + 1.
    					index >= 4 
    						ifTrue: 
    							[array4 at: 1 put: (pointCollection at: index - 3).
    							array4 at: 2 put: (pointCollection at: index - 2).
    							array4 at: 3 put: (pointCollection at: index - 1).
    							array4 at: 4 put: (pointCollection at: index).
    							points := array4]
    						ifFalse: 
    							[index >= 3 
    								ifTrue: 
    									[array3 at: 1 put: (pointCollection at: index - 2).
    									array3 at: 2 put: (pointCollection at: index - 1).
    									array3 at: 3 put: (pointCollection at: index).
    									points := array3]
    								ifFalse: 
    									[array2 at: 1 put: (pointCollection at: index - 1).
    									array2 at: 2 put: (pointCollection at: index).
    									points := array2]].
    					gc displayPolyline: points.
    					previous := current].
    			Processor yield].
    	viewSize := self view bounds width max: self view bounds height.
    	(pointCollection first dist: pointCollection last) > (viewSize / 2) 
    		ifTrue: 
    			[gc displayPolyline: pointCollection.
    			self sensor shiftDown 
    				ifFalse: [self model pencilOpenedPointCollection: pointCollection from: self].
    			self view redisplay]
    		ifFalse: 
    			[pointCollection first = pointCollection last 
    				ifFalse: [pointCollection add: pointCollection first].
    			gc displayPolyline: pointCollection.
    			self sensor shiftDown 
    				ifFalse: [self model pencilClosedPointCollection: pointCollection from: self].
    			self view redisplay]
  7. redButtonActivity [control defaults] xrefs
    	| state |
    	state := self model buttonState.
    	state = #pick 
    		ifTrue: 
    			[(self model pickButton respondsTo: #selectedSelector) 
    				ifTrue: 
    					[| symbol |
    					symbol := self model pickButton selectedSelector.
    					symbol = #pickNormal 
    						ifTrue: [^Cursor normal showWhile: [self pickActivity]].
    					symbol = #pickBounds 
    						ifTrue: [^JunCursors crossCursor showWhile: [self boundsActivity]].
    					symbol = #pickPencil 
    						ifTrue: [^JunCursors pencilCursor showWhile: [self pencilActivity]]]
    				ifFalse: [^Cursor normal showWhile: [self pickActivity]]].
    	state = #grab 
    		ifTrue: [^JunCursors handCursor showWhile: [self grabActivity]].
    	state = #drag 
    		ifTrue: [^JunCursors quartersCursor showWhile: [self dragActivity]].
    	state = #focus 
    		ifTrue: [^JunCursors glassCursor showWhile: [self focusActivity]].
    	^Cursor bull showWhile: [self clickActivity]
  8. yellowButtonActivity [control defaults] xrefs
    	super yellowButtonActivity ifNil: [^nil].
    	"self model is3d 
    		ifTrue: 
    			[| state |
    			self 
    				assert: 
    					[state := self model buttonState.
    					state = #grab ifFalse: [self model buttonState: #grab]]
    				do: [JunCursors handCursor showWhile: [self grabActivity]]
    				ensure: [self model buttonState: state]]."
    	^self processMenuAt: self sensor globalCursorPoint centered: true

class methods:

  1. copyright [copyright] xrefs
    	^'ChemoJun050 (2006/08/08) Copyright 2002-2006 National Institute of Informatics, Research Organization of Information and Systems.'
  2. system [copyright] xrefs
    	^'ChemoJun'
  3. version [copyright] xrefs
    	^'050'

index xrefs