| com.nodelab.equity | ![]()  | 
com.nodelab.0.10171
Instance of Type
Inheriting from Calculator
| Type data | Value | 
| org.uninode.Type.displayPattern | a {att:org.uninode.Node.type} | 
| org.uninode.Resource.resourceType | |
| org.uninode.Resource.label | |
| org.uninode.Resource.resourceOf | List{} | 
| org.uninode.Listable.resources | Reference[org.uninode.Listable.resources] of com.nodelab.equity.CalcBSVol | 
| Attribute summary | Defined in | Uninode® Id | Properties | Default | |
| Reference[org.uninode.Listable.resources] | resources | Listable | org.uninode.0.2001 | type | |
| String | toString This is the display string.  | Node | org.uninode.0.102 | ||
| Type | type The type of an object determines the behaviour and attributes of the object.  | Node | org.uninode.0.101 | ||
| String | uri | Node | org.uninode.0.103 | ||
| String | label | Resource | org.uninode.0.2041 | type | |
| List[Type] | resourceOf | Resource | org.uninode.0.2042 | type | |
| Signature | resourceType This defines the type of resource. It can be 'view', 'adapter' or 'action'  | Resource | org.uninode.0.2043 | type | |
| Script summary | 
com.nodelab.0.10376/*
constructor() {
  View:();
}
BaliCalculator subclass: #BaliCalcBSVol
	instanceVariableNames: 'vol180d dateText date name vol90d vol1y vol1_5y vol30d vol60d vol2y report '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Bali'!
!BaliCalcBSVol methodsFor: 'aspects'!
date
	^self display dimHistory focus!
date: aBaliTime
	self display dimHistory focus: aBaliTime.!
dateText
	^self display dimHistory focusHolder!
name
	^name isNil
		ifTrue:
			[name := String new asValue]
		ifFalse:
			[name]!
report
	"This method was generated by UIDefiner.  Any edits made here
	may be lost whenever methods are automatically defined.  The
	initialization provided below may have been preempted by an
	initialize method."
	^report isNil
		ifTrue:
			[report := String new asValue]
		ifFalse:
			[report]!
vol180d
	^vol180d isNil
		ifTrue:
			[vol180d := nil asValue]
		ifFalse:
			[vol180d]!
vol1y
	^vol1y isNil
		ifTrue:
			[vol1y := nil asValue]
		ifFalse:
			[vol1y]!
vol1_5y
	^vol1_5y isNil
		ifTrue:
			[vol1_5y := nil asValue]
		ifFalse:
			[vol1_5y]!
vol2y
	^vol2y isNil
		ifTrue:
			[vol2y := nil asValue]
		ifFalse:
			[vol2y]!
vol30d
	^vol30d isNil
		ifTrue:
			[vol30d := nil asValue]
		ifFalse:
			[vol30d]!
vol60d
	^vol60d isNil
		ifTrue:
			[vol60d := nil asValue]
		ifFalse:
			[vol60d]!
vol90d
	^vol90d isNil
		ifTrue:
			[vol90d := nil asValue]
		ifFalse:
			[vol90d]! !
!BaliCalcBSVol methodsFor: 'actions'!
calculate
	| vol source dim env |
	source := self display plugin firstSource.
	self name value: source printString.
	dim := self display dimHistory.
	self date: dim focus.
	vol := BaliVolatilityBS new nextSource: source.
	dim := self display dimCurrent.
	env := self display envDimensions.
	vol days value: 730.
	self report value: 'Calculating 2 years...'.
	self vol2y value: (vol valueAspect: #value environment: env).
	vol days value: 550.
	vol refresh.
	self report value: 'Calculating 1.5 years...'.
	self vol1_5y value: (vol valueAspect: #value environment: env).
	vol days value: 365.
	vol refresh.
	self report value: 'Calculating 1 year...'.
	self vol1y value: (vol valueAspect: #value environment: env).
	self report value: 'Calculating 180 days...'.
	vol days value: 180.
	vol refresh.
	self vol180d value: (vol valueAspect: #value environment: env).
	self report value: 'Calculating 90 days...'.
	vol days value: 90.
	vol refresh.
	self vol90d value: (vol valueAspect: #value environment: env).
	self report value: 'Calculating 60 days...'.
	vol days value: 60.
	vol refresh.
	self vol60d value: (vol valueAspect: #value environment: env).
	self report value: 'Calculating 30 days...'.
	vol days value: 30.
	vol refresh.
	self vol30d value: (vol valueAspect: #value environment: env).
	self report value: ''.!
changeDate
	self display dimHistory realtime value: false.
	self date: (BaliTime fromString: self dateText value string).
	self reset.!
dateChanged
	self date: (BaliTime fromDate: (self screen control convertToDate: self dateText value string)).
	self calculate!
report: aString
	self name value: aString! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
BaliCalcBSVol class
	instanceVariableNames: ''!
!BaliCalcBSVol class methodsFor: 'interface specs'!
windowSpec
	"UIPainter new openOnClass: self andSelector: #windowSpec"
	
	^#(#FullSpec 
		#window: 
		#(#WindowSpec 
			#label: 'B&S Vol' 
			#min: #(#Point 144 244 ) 
			#max: #(#Point 144 244 ) 
			#bounds: #(#Rectangle 739 704 883 948 ) 
			#colors: 
			#(#LookPreferences 
				#setForegroundColor: #(#ColorValue #black ) 
				#setBackgroundColor: #(#ColorValue 6143 7167 8191 ) 
				#setSelectionForegroundColor: #(#ColorValue #black ) 
				#setSelectionBackgroundColor: #(#ColorValue 4915 4915 4915 ) 
				#setBorderColor: #(#ColorValue #black ) ) 
			#isEventDriven: true ) 
		#component: 
		#(#SpecCollection 
			#collection: #(
				#(#InputFieldSpec 
					#layout: #(#Rectangle 4 3 142 26 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #name ) 
				#(#LabelSpec 
					#layout: #(#Point 5 83 ) 
					#label: '30 days' ) 
				#(#LabelSpec 
					#layout: #(#Point 5 105 ) 
					#label: '60 days' ) 
				#(#LabelSpec 
					#layout: #(#Point 5 129 ) 
					#label: '90 days' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 47 28 142 51 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #dateText 
					#callbacksSpec: 
					#(#UIEventCallbackSubSpec 
						#valueChangeSelector: #changeDate ) 
					#tabable: false 
					#isReadOnly: true ) 
				#(#LabelSpec 
					#layout: #(#Point 5 32 ) 
					#label: ' date' ) 
				#(#LabelSpec 
					#layout: #(#Point 5 152 ) 
					#label: '180 days' ) 
				#(#LabelSpec 
					#layout: #(#Point 5 174 ) 
					#label: '1 year' ) 
				#(#LabelSpec 
					#layout: #(#Point 5 198 ) 
					#label: '1.5 years' ) 
				#(#LabelSpec 
					#layout: #(#Point 5 221 ) 
					#label: '2 years' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 64 81 142 102 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #vol30d 
					#tabable: false 
					#alignment: #right 
					#isReadOnly: true 
					#type: #number 
					#formatString: '0.000' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 64 104 142 125 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #vol60d 
					#tabable: false 
					#alignment: #right 
					#isReadOnly: true 
					#type: #number 
					#formatString: '0.000' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 64 127 142 148 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #vol90d 
					#tabable: false 
					#alignment: #right 
					#isReadOnly: true 
					#type: #number 
					#formatString: '0.000' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 64 150 142 171 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #vol180d 
					#tabable: false 
					#alignment: #right 
					#isReadOnly: true 
					#type: #number 
					#formatString: '0.000' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 64 173 142 194 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #vol1y 
					#tabable: false 
					#alignment: #right 
					#isReadOnly: true 
					#type: #number 
					#formatString: '0.000' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 64 196 142 217 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #vol1_5y 
					#tabable: false 
					#alignment: #right 
					#isReadOnly: true 
					#type: #number 
					#formatString: '0.000' ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 64 219 142 240 ) 
					#colors: 
					#(#LookPreferences 
						#setBackgroundColor: #(#ColorValue 7700 7700 7700 ) ) 
					#model: #vol2y 
					#tabable: false 
					#alignment: #right 
					#isReadOnly: true 
					#type: #number 
					#formatString: '0.000' ) 
				#(#DividerSpec 
					#layout: #(#LayoutFrame 5 0 67 0 -5 1 71 0 ) ) 
				#(#ArbitraryComponentSpec 
					#layout: #(#LayoutFrame -30 1 58 0 -5 1 77 0 ) 
					#flags: 0 
					#component: #logotype ) 
				#(#InputFieldSpec 
					#layout: #(#Rectangle 7 245 141 267 ) 
					#flags: 0 
					#colors: 
					#(#LookPreferences 
						#setForegroundColor: #(#ColorValue #blue ) ) 
					#model: #report 
					#tabable: false 
					#alignment: #center 
					#isReadOnly: true ) ) ) )! !
*/ |