<?xml version="1.0"?>

<st-source>
<!-- 
Name: SeasideContributions
Notice: All rights reserved
BundleName: SeasideContributions
Comment: Seaside-Contributions

Part of Seaside Bonus Pack version SeasideBonusPack 2.7b1.1.0   8 August 2007, 15:14:13 pm

Tree control from Torsten Bergmann [astares@gmx.de]
See example of use STSClassBrowser in parcel SeasideWidgetTests.

Here's something the community could help with: if anyone wants to round up some examples that are used for other frameworks and implement them in Seaside, I'll start a 'Seaside-Contributed Examples' and include them in the package.  I suggest this in particular because it serves a dual purpose: first, to provide example code to newbies, with easy comparison to other systems.   Second, the more example code I have access to (particularly code written by others), the better I can refactor and fine-tune the underlying framework.
Avi Bryant



DevelopmentPrerequisites: #(#(#any 'SeasideBase' ''))
Parcel: #('SeasideContributions')
ParcelName: SeasideContributions
PrerequisiteParcels: #(#('SeasideBase' ''))
Version: 2.7b1.1.0
Date: 2:52:27 pm August 8, 2007
 -->
<time-stamp>From VisualWorks®, 7.5 of April 16, 2007 on August 8, 2007 at 2:52:27 pm</time-stamp>


<do-it>(Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned.  Choose terminate or close.']</do-it>

<class>
<name>WAWebTreeComponent</name>
<environment>Seaside</environment>
<super>Seaside.WAComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>backgroundColor rootNodes eventHandler </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Contrib</category>
<attributes>
<package>Seaside-Contributions</package>
</attributes>
</class>

<class>
<name>WAColorExtensionTest</name>
<environment>Seaside</environment>
<super>XProgramming.SUnit.TestCase</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Contrib</category>
<attributes>
<package>Seaside-Contributions</package>
</attributes>
</class>

<class>
<name>WAWebTreeExample</name>
<environment>Seaside</environment>
<super>Seaside.WAComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Contrib</category>
<attributes>
<package>Seaside-Contributions</package>
</attributes>
</class>

<class>
<name>WAWebTreeLibrary</name>
<environment>Seaside</environment>
<super>Seaside.WAFileLibrary</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Contrib</category>
<attributes>
<package>Seaside-Contributions</package>
</attributes>
</class>

<class>
<name>WAWebTreeNode</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>wrappedObject subnodes isExpanded </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Contrib</category>
<attributes>
<package>Seaside-Contributions</package>
</attributes>
</class>

<class>
<name>WAWebTreeNodeTest</name>
<environment>Seaside</environment>
<super>XProgramming.SUnit.TestCase</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>instance </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Contrib</category>
<attributes>
<package>Seaside-Contributions</package>
</attributes>
</class>

<class>
<name>WAWebTreeSelectComponent</name>
<environment>Seaside</environment>
<super>Seaside.WAWebTreeComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Contrib</category>
<attributes>
<package>Seaside-Contributions</package>
</attributes>
</class>

<methods>
<class-id>Seaside.WAWebTreeComponent</class-id> <category>operations</category>

<body package="Seaside-Contributions" selector="addRootNode:">addRootNode: aTreeNode

	self rootNodes add: aTreeNode</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeComponent</class-id> <category>accessing</category>

<body package="Seaside-Contributions" selector="backgroundColor">backgroundColor 

	backgroundColor isNil ifTrue: [backgroundColor := self defaultBackgroundColor].
	^backgroundColor</body>

<body package="Seaside-Contributions" selector="backgroundColor:">backgroundColor: aColor
	backgroundColor := aColor</body>

<body package="Seaside-Contributions" selector="eventHandler">eventHandler
	^eventHandler</body>

<body package="Seaside-Contributions" selector="eventHandler:">eventHandler: anObject
	eventHandler := anObject</body>

<body package="Seaside-Contributions" selector="rootNodes">rootNodes

	rootNodes isNil ifTrue: [rootNodes := OrderedCollection new].
	^rootNodes</body>

<body package="Seaside-Contributions" selector="rootNodes:">rootNodes: aCollection

	rootNodes := aCollection</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeComponent</class-id> <category>defaults</category>

<body package="Seaside-Contributions" selector="defaultBackgroundColor">defaultBackgroundColor

	^Color white</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeComponent</class-id> <category>events</category>

<body package="Seaside-Contributions" selector="onCollapseNode:">onCollapseNode: aNode 
	aNode collapse.
	eventHandler notNil
		ifTrue: [eventHandler onCollapseNode: aNode]</body>

<body package="Seaside-Contributions" selector="onExpandNode:">onExpandNode: aNode 
	aNode expand.
	eventHandler notNil
		ifTrue: [eventHandler onExpandNode: aNode]</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeComponent</class-id> <category>rendering</category>

<body package="Seaside-Contributions" selector="renderContentOn:">renderContentOn: html 
	(html div)
		class: #webTree;
		style: 'background-color: ' , self backgroundColor asHTMLColor;
		with: [self renderNodes: self rootNodes on: html]</body>

<body package="Seaside-Contributions" selector="renderNodes:on:">renderNodes: nodes on: html 
	"Renders the given collection of nodes on the renderer.
	Leading nodes have a different appearance than the last node"

	nodes isEmpty ifTrue: [^self].
	(html table)
		class: #layout;
		with: 
				[nodes size &gt; 1 
					ifTrue: 
						[(1 to: nodes size - 1) 
							do: [:index | self renderInnerNode: (nodes at: index) on: html]].
				self renderLastNode: nodes last on: html]</body>

<body package="Seaside-Contributions" selector="updateRoot:">updateRoot: anHtmlRoot
	super updateRoot: anHtmlRoot.
	WAWebTreeLibrary default updateRoot: anHtmlRoot.</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeComponent</class-id> <category>node rendering</category>

<body package="Seaside-Contributions" selector="renderExpansionForInnerNode:on:">renderExpansionForInnerNode: aNode on: html 

	aNode isExpanded ifTrue: 
		[ html tableRow: 
			[ html tableData class: #verticalBar; with: ''.
			html tableData: [ self renderNodes: aNode subnodes on: html ]]]</body>

<body package="Seaside-Contributions" selector="renderExpansionForLastNode:on:">renderExpansionForLastNode: aNode on: html

	aNode isExpanded ifTrue:
		[ html tableRow:
			[ html 
				tableData: '';
				tableData: [ self renderNodes: aNode subnodes on: html ]]]</body>

<body package="Seaside-Contributions" selector="renderImageCellFor:actionBlock:on:">renderImageCellFor: aFilenameString actionBlock: aBlock on: html 
	html tableData:
		[ html anchor
				callback: aBlock;
				with: [ self renderImageFor: aFilenameString on: html ]]</body>

<body package="Seaside-Contributions" selector="renderImageCellFor:on:">renderImageCellFor: aFilenameString on: html 
	html tableData:
		[  self renderImageFor: aFilenameString on: html ]</body>

<body package="Seaside-Contributions" selector="renderImageFor:on:">renderImageFor: aFilenameString on: html 
	html image
		class: #noBorder;
		url: (self resources addToPath: aFilenameString)</body>

<body package="Seaside-Contributions" selector="renderImageForInnerNode:on:">renderImageForInnerNode: aNode on: html 

	aNode hasSubnodes
		ifFalse: [ ^ self renderImageCellFor: 'branchImageCenter.gif' on: html ].
		
	aNode isExpanded
		ifTrue:
			[ self renderImageCellFor: 'minusImageCenter.gif'
				actionBlock: [ self onCollapseNode: aNode ]
				on: html ]
		ifFalse:
			[ self renderImageCellFor: 'plusImageCenter.gif'
				actionBlock: [ self onExpandNode: aNode ]
				on: html ]</body>

<body package="Seaside-Contributions" selector="renderImageForLastNode:on:">renderImageForLastNode: aNode on: html 

	aNode hasSubnodes
		ifFalse: [ ^ self renderImageCellFor: 'branchImageBottom.gif'on: html ].

	aNode isExpanded
		ifTrue:
			[ self renderImageCellFor: 'minusImageBottom.gif'
				actionBlock: [ self onCollapseNode: aNode ]
				on: html ]
		ifFalse:
			[ self renderImageCellFor: 'plusImageBottom.gif'
				actionBlock: [ self onExpandNode: aNode ]
				on: html ]</body>

<body package="Seaside-Contributions" selector="renderInnerNode:on:">renderInnerNode: aNode on: html 

	html tableRow: [
		self renderImageForInnerNode: aNode on: html.
		html tableData: aNode wrappedObject ].

	self renderExpansionForInnerNode: aNode on: html</body>

<body package="Seaside-Contributions" selector="renderLastNode:on:">renderLastNode: aNode on: html

	html tableRow: [
		self renderImageForLastNode: aNode on: html.
		html tableData: aNode wrappedObject ].

	self renderExpansionForLastNode: aNode on: html</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeComponent</class-id> <category>resources</category>

<body package="Seaside-Contributions" selector="resources">resources
	^ WAUrl new
		addToPath: WADispatcher default basePath;
		addToPath: '/files/WAWebTreeLibrary/';
		yourself</body>
</methods>

<methods>
<class-id>Seaside.WAColorExtensionTest</class-id> <category>testing</category>

<body package="Seaside-Contributions" selector="testAsHTMLString">testAsHTMLString
	"Squeak's black is different from VW's black"
	self 
		assert: Color white asHTMLColor = '#FFFFFF';
		assert: Color blue asHTMLColor = '#0000FF';
		assert: Color green asHTMLColor = '#00FF00';
		assert: Color red asHTMLColor = '#FF0000';
		assert: Color black asHTMLColor = '#000000';
		assert: (Color fromString: '10BACE') asHTMLColor = '#10BACE'</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeExample</class-id> <category>interface creation</category>

<body package="Seaside-Contributions" selector="createTreeView1">createTreeView1
	^ self treeComponentClass new backgroundColor: Color lightYellow;
		 rootNodes: self testTreeProvider webTree1;
		 yourself</body>

<body package="Seaside-Contributions" selector="createTreeView2">createTreeView2
	^ self treeComponentClass new backgroundColor: Color yellow;
		 rootNodes: self testTreeProvider webTree2;
		 yourself</body>

<body package="Seaside-Contributions" selector="createTreeView3">createTreeView3
	^ self treeComponentClass new backgroundColor: Color yellow;
		 rootNodes: self testTreeProvider webTree3;
		 yourself</body>

<body package="Seaside-Contributions" selector="createTreeView4">createTreeView4

	^self treeComponentClass new
		backgroundColor: Color yellow;
		rootNodes: self testTreeProvider webTree4;			
		yourself</body>

<body package="Seaside-Contributions" selector="createTreeView5">createTreeView5
	^ self treeComponentClass new backgroundColor: Color yellow;
		 rootNodes: self testTreeProvider webTree5;
		 yourself</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeExample</class-id> <category>attributes</category>

<body package="Seaside-Contributions" selector="testTreeProvider">testTreeProvider
	"Returns an object providing access to test examples for trees"
	^ WAWebTreeNodeTest</body>

<body package="Seaside-Contributions" selector="treeComponentClass">treeComponentClass
	"Returns the component used for rendering trees"
	^ WAWebTreeComponent</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeExample</class-id> <category>rendering</category>

<body package="Seaside-Contributions" selector="call:">call: aComponent 
	super call: (aComponent
				addDecoration: (WAWindowDecoration new title: 'WebTree demo');
				yourself)</body>

<body package="Seaside-Contributions" selector="renderContentOn:">renderContentOn: html 
	(html anchor)
		callback: [self call: self createTreeView1];
		with: 'TreeView 1'.
	html break.
	(html anchor)
		callback: [self call: self createTreeView2];
		with: 'TreeView 2'.
	html break.
	(html anchor)
		callback: [self call: self createTreeView3];
		with: 'TreeView 3'.
	html break.
	(html anchor)
		callback: [self call: self createTreeView4];
		with: 'TreeView 4'.
	html break.
	(html anchor)
		callback: [self call: self createTreeView5];
		with: 'Smalltalk Hierarchy'</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeExample class</class-id> <category>class initialization</category>

<body package="Seaside-Contributions" selector="initialize">initialize
	self registerAsApplication: 'examples/webtree'</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeLibrary</class-id> <category>images</category>

<body package="Seaside-Contributions" selector="branchImageBottomGif">branchImageBottomGif
	| xxxCache |
	xxxCache := #(nil) beMutable.
	(xxxCache at: 1) isNil ifTrue: [
		xxxCache at: 1 put: #(71 73 70 56 57 97 19 0 16 0 231 0 0 0 0 0 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 249 4 9 0 0 0 0 44 0 0 0 0 19 0 16 0 0 8 43 0 1 8 28 40 48 0 193 131 8 19 42 76 104 112 161 195 135 8 27 66 156 232 80 34 197 139 7 13 106 4 176 209 34 198 143 32 67 138 28 9 50 32 0 59) asByteArray ].
	^ xxxCache at: 1</body>

<body package="Seaside-Contributions" selector="branchImageCenterGif">branchImageCenterGif
	| xxxCache |
	xxxCache := #(nil) beMutable.
	(xxxCache at: 1) isNil ifTrue: [
		xxxCache at: 1 put: #(71 73 70 56 57 97 19 0 16 0 231 0 0 0 0 0 128 128 128 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 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 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 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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 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 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 33 249 4 9 0 0 0 0 44 0 0 0 0 19 0 16 0 0 8 47 0 1 8 28 40 48 0 193 131 8 19 42 76 104 112 161 195 135 8 27 66 156 232 80 34 197 139 7 13 106 4 176 209 34 70 134 31 67 22 20 25 210 35 73 130 1 1 0 59) asByteArray ].
	^ xxxCache at: 1</body>

<body package="Seaside-Contributions" selector="minusImageBottomGif">minusImageBottomGif
	| xxxCache |
	xxxCache := #(nil) beMutable.
	(xxxCache at: 1) isNil ifTrue: [
		xxxCache at: 1 put: #(71 73 70 56 57 97 19 0 16 0 231 0 0 0 0 0 0 0 1 128 128 128 255 255 255 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 33 249 4 9 0 0 0 0 44 0 0 0 0 19 0 16 0 0 8 75 0 1 8 28 40 80 0 193 131 8 19 42 76 104 112 161 195 135 5 5 72 156 40 209 161 128 1 0 48 106 108 168 208 160 198 140 0 56 50 252 184 209 34 128 0 40 81 134 92 105 80 228 69 144 37 23 122 132 185 82 38 201 140 34 17 82 220 9 177 167 207 159 11 3 2 0 59) asByteArray ].
	^ xxxCache at: 1</body>

<body package="Seaside-Contributions" selector="minusImageCenterGif">minusImageCenterGif
	| xxxCache |
	xxxCache := #(nil) beMutable.
	(xxxCache at: 1) isNil ifTrue: [
		xxxCache at: 1 put: #(71 73 70 56 57 97 19 0 16 0 231 0 0 0 0 0 128 128 128 0 0 1 255 255 255 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 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 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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144 37 23 122 132 185 82 38 201 140 34 17 82 220 9 177 103 71 159 64 3 2 0 59) asByteArray ].
	^ xxxCache at: 1</body>

<body package="Seaside-Contributions" selector="plusImageBottomGif">plusImageBottomGif
	| xxxCache |
	xxxCache := #(nil) beMutable.
	(xxxCache at: 1) isNil ifTrue: [
		xxxCache at: 1 put: #(71 73 70 56 57 97 19 0 16 0 231 0 0 0 0 0 128 128 128 0 0 1 255 255 255 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 33 249 4 9 0 0 0 0 44 0 0 0 0 19 0 16 0 0 8 80 0 1 8 28 40 48 0 193 131 8 19 42 76 104 112 161 195 135 5 3 72 156 40 209 97 128 1 0 48 106 108 168 208 32 70 1 25 1 112 100 168 81 192 70 139 0 4 168 84 41 178 165 193 145 23 51 154 204 56 18 161 199 148 33 107 30 140 169 145 166 69 138 20 33 10 29 74 116 97 64 0 59) asByteArray ].
	^ xxxCache at: 1</body>

<body package="Seaside-Contributions" selector="plusImageCenterGif">plusImageCenterGif
	| xxxCache |
	xxxCache := #(nil) beMutable.
	(xxxCache at: 1) isNil ifTrue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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 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 249 4 9 0 0 0 0 44 0 0 0 0 19 0 16 0 0 8 80 0 1 8 28 40 48 0 193 131 8 19 42 76 104 112 161 195 135 5 3 72 156 40 209 97 128 1 0 48 106 108 168 208 32 70 1 25 1 112 100 168 81 192 70 139 0 4 168 84 41 178 165 193 145 23 51 154 204 56 18 161 199 148 33 107 30 140 169 145 166 69 138 20 33 10 237 56 180 104 64 0 59) asByteArray ].
	^ xxxCache at: 1</body>

<body package="Seaside-Contributions" selector="verticalImageGif">verticalImageGif
	| xxxCache |
	xxxCache := #(nil) beMutable.
	(xxxCache at: 1) isNil ifTrue: [
		xxxCache at: 1 put: #(71 73 70 56 57 97 16 0 16 0 231 0 0 0 0 0 128 128 128 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 0 0 0 0 0 0 0 0 0 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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 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 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 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 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 33 249 4 9 0 0 0 0 44 0 0 0 0 16 0 16 0 0 8 39 0 1 8 28 40 48 0 193 131 8 19 42 4 96 112 161 195 135 13 31 74 68 24 113 162 69 134 23 51 86 204 8 145 163 197 141 30 3 2 0 59) asByteArray ].
	^ xxxCache at: 1</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeLibrary</class-id> <category>accessing</category>

<body package="Seaside-Contributions" selector="selectorsToInclude">selectorsToInclude
	^ #( #webTreeCss )</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeLibrary</class-id> <category>stylesheets</category>

<body package="Seaside-Contributions" selector="webTreeCss">webTreeCss
	^ '
.webTree {
}
.verticalBar {
	background-image: url(verticalImage.gif);
}
.noBorder {
	border: none;
	margin: -1px;
}
.layout {
	border-collapse: collapse;
	margin: 0;
	scroll: auto;
}
.layout td {
	font-size: 90%; font-family: arial
}	
'</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode</class-id> <category>accessing</category>

<body package="Seaside-Contributions" selector="addChild:">addChild: aChildNode
	self subnodes add: aChildNode</body>

<body package="Seaside-Contributions" selector="subnodes">subnodes

	subnodes isNil ifTrue: [subnodes := OrderedCollection new].
	^subnodes</body>

<body package="Seaside-Contributions" selector="wrappedObject">wrappedObject

	^wrappedObject</body>

<body package="Seaside-Contributions" selector="wrappedObject:">wrappedObject: anObject

	wrappedObject := anObject</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode</class-id> <category>operations</category>

<body package="Seaside-Contributions" selector="collapse">collapse

	self isExpanded: false</body>

<body package="Seaside-Contributions" selector="expand">expand

	self isExpanded: true</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode</class-id> <category>testing</category>

<body package="Seaside-Contributions" selector="hasSubnodes">hasSubnodes
	"the first test is necessary to avoid the lazy initialization in the getter"

	^subnodes notNil and: [self subnodes isEmpty not]</body>

<body package="Seaside-Contributions" selector="isCollapsed">isCollapsed
	"Returns true if the node is a leaf node or the node is collapsed"

	^self isExpanded not</body>

<body package="Seaside-Contributions" selector="isExpanded">isExpanded
	"Returns true if the node is expanded. Note that leaf node always return false"

	^isExpanded and: [self hasSubnodes]</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode</class-id> <category>initialize-release</category>

<body package="Seaside-Contributions" selector="initialize">initialize
	self collapse</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode</class-id> <category>private-accessing</category>

<body package="Seaside-Contributions" selector="isExpanded:">isExpanded: aBoolean
	
	isExpanded := aBoolean</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode</class-id> <category>printing</category>

<body package="Seaside-Contributions" selector="printOn:">printOn: aStream
	"prints the receiver on aStream"

	aStream nextPutAll: '##('.
	self wrappedObject printOn: aStream.
	aStream nextPut: $)</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode class</class-id> <category>instance creation</category>

<body package="Seaside-Contributions" selector="for:">for: anObject

	^self new
		wrappedObject: anObject;
		yourself</body>

<body package="Seaside-Contributions" selector="for:childBlock:">for: rootObject childBlock: aOneArgumentBlock 
	"self for: Object childBlock: [:each | each subclasses]"
	| coll node |
	coll := aOneArgumentBlock value: rootObject.
	node := self for: rootObject.
	coll isEmpty
		ifTrue: [^ node].
	coll
		do: [:child | node
				addChild: (self for: child childBlock: aOneArgumentBlock)].
	^ node</body>

<body package="Seaside-Contributions" selector="new">new

	^ super new initialize</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNode class</class-id> <category>examples</category>

<body package="Seaside-Contributions" selector="smalltalkHierarchy">smalltalkHierarchy
	"Returns an instance of the receiver wrapping the smalltalk class 
	hierarchy using Object as root node"
	^ self
		for: Object
		childBlock: [:each | each subclasses]</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest</class-id> <category>utilities</category>

<body package="Seaside-Contributions" selector="createNewWebTreeNode">createNewWebTreeNode

	^self defaultTestClass new</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest</class-id> <category>attributes</category>

<body package="Seaside-Contributions" selector="defaultTestClass">defaultTestClass
	^ self class defaultTestClass</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest</class-id> <category>accessing</category>

<body package="Seaside-Contributions" selector="instance:">instance: aTestInstance

	instance := aTestInstance</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest</class-id> <category>running</category>

<body package="Seaside-Contributions" selector="setUp">setUp
	super setUp.
	self instance: self createNewWebTreeNode.</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest</class-id> <category>testing</category>

<body package="Seaside-Contributions" selector="testAddingChildNodes">testAddingChildNodes

	self deny: instance hasSubnodes.
	
	instance addChild: self createNewWebTreeNode.

	self assert: instance hasSubnodes</body>

<body package="Seaside-Contributions" selector="testDefaultInstanceCreation">testDefaultInstanceCreation

	self 
		assert: instance isCollapsed;
		deny: instance isExpanded;
		deny: instance hasSubnodes</body>

<body package="Seaside-Contributions" selector="testExpandingCollapsing">testExpandingCollapsing

	self instance: self class treeNodeWithTwoSubnodes.
	
	self 
		assert: instance isCollapsed;
		deny: instance isExpanded.
	
	instance expand.

	self 
		deny: instance isCollapsed	;
		assert: instance isExpanded</body>

<body package="Seaside-Contributions" selector="testInstanceCreationWithWrappedObject">testInstanceCreationWithWrappedObject

	|object|
	object := 'Test'.
	instance := self defaultTestClass for: object.
	self 
		assert: (instance wrappedObject == object);
		assert: (instance isKindOf: self defaultTestClass);
		assert: instance isCollapsed;
		deny: instance isExpanded</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest class</class-id> <category>attributes</category>

<body package="Seaside-Contributions" selector="defaultTestClass">defaultTestClass
	^ WAWebTreeNode</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest class</class-id> <category>private</category>

<body package="Seaside-Contributions" selector="nodeFor:">nodeFor: anObject 
	^ self defaultTestClass for: anObject</body>

<body package="Seaside-Contributions" selector="simpleTreeFor:">simpleTreeFor: anArray

	^(self nodeFor: anArray first)
		addChild: (self nodeFor: anArray second);
		addChild: (self nodeFor: anArray last);
		yourself</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeNodeTest class</class-id> <category>test data</category>

<body package="Seaside-Contributions" selector="treeNodeWithTwoSubnodes">treeNodeWithTwoSubnodes

	^self simpleTreeFor: #('A' 'D' 'E')</body>

<body package="Seaside-Contributions" selector="webTree1">webTree1
 
	^ OrderedCollection new
		add: (self simpleTreeFor: #('A' 'D' 'E' ));
		
		add: (self simpleTreeFor: #('B' 'F' 'G' ));
		
		add: (self nodeFor: 'Z');
		
		add: (self simpleTreeFor: #('C' 'H' 'I' ));
		 yourself</body>

<body package="Seaside-Contributions" selector="webTree2">webTree2
 
	^OrderedCollection new
		add: (self simpleTreeFor: #('A' 'D' 'E'));
		add: (self simpleTreeFor: #('B' 'F' 'G'));		
		add: (self simpleTreeFor: #('C' 'H' 'I'));
		add: (self nodeFor: 'Z');
		yourself</body>

<body package="Seaside-Contributions" selector="webTree3">webTree3
 
	
	^OrderedCollection 
		with: (self simpleTreeFor: #('A' 'D' 'E'))</body>

<body package="Seaside-Contributions" selector="webTree4">webTree4
 
	|node|
	node := self simpleTreeFor: #('B' 'F' 'G').	
	node addChild: (self simpleTreeFor: #('J' 'K' 'L')).
	^OrderedCollection new
		add: (self simpleTreeFor: #('A' 'D' 'E'));
		add: node;
		add: (self nodeFor: 'Z');
		add: (self simpleTreeFor: #('C' 'H' 'I'));
		yourself</body>

<body package="Seaside-Contributions" selector="webTree5">webTree5
 
	^ OrderedCollection with: self defaultTestClass
				smalltalkHierarchy</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeSelectComponent</class-id> <category>node rendering</category>

<body package="Seaside-Contributions" selector="renderInnerNode:on:">renderInnerNode: aNode on: html 
	html tableRow: 
			[self renderImageForInnerNode: aNode on: html.
			html tableData: 
					[html anchor 
							callback: [self onSelectNode: aNode];
							with: aNode wrappedObject]].

	self renderExpansionForInnerNode: aNode on: html</body>

<body package="Seaside-Contributions" selector="renderLastNode:on:">renderLastNode: aNode on: html 
	html tableRow: 
			[self renderImageForLastNode: aNode on: html.
			html tableData: 
					[html anchor
							callback: [self onSelectNode: aNode];
							with: aNode wrappedObject]].

	self renderExpansionForLastNode: aNode on: html</body>
</methods>

<methods>
<class-id>Seaside.WAWebTreeSelectComponent</class-id> <category>events</category>

<body package="Seaside-Contributions" selector="onSelectNode:">onSelectNode: aNode
 
	eventHandler notNil
		ifTrue: [eventHandler onSelectNode: aNode]</body>
</methods>

<initialize>
<class-id>Seaside.WAWebTreeExample</class-id>
</initialize>

<do-it>"Imported Classes:"</do-it>

<do-it>self error: 'Attempting to file-in parcel imports.  Choose terminate or close'</do-it>

<class>
<name>Object</name>
<environment>Core</environment>
<super></super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Kernel-Objects</category>
<attributes>
<package>Kernel-Objects</package>
</attributes>
</class>

<class>
<name>WAFileLibrary</name>
<environment>Seaside</environment>
<super>Seaside.WALibrary</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars>default </class-inst-vars>
<imports></imports>
<category>Seaside-Libraries</category>
<attributes>
<package>Seaside-Libraries</package>
</attributes>
</class>

<class>
<name>WAComponent</name>
<environment>Seaside</environment>
<super>Seaside.WAPresenter</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>decoration </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Seaside-Component</category>
<attributes>
<package>Seaside-Component</package>
</attributes>
</class>

<class>
<name>TestCase</name>
<environment>XProgramming.SUnit</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>testSelector </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SUnit</category>
<attributes>
<package>SUnit</package>
</attributes>
</class>

</st-source>
