From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:52:33 pm (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.'] <class> <name>AutohideTabControlComposite</name> <environment>Refactory.Browser</environment> <super>UI.TabControlComposite</super> <private>false</private> none <imports></imports> <category>My Classes</category> <attributes> <package>RBTabbedToolsets</package> </attributes> </class> <comment> Refactory.Browser.AutohideTabControlComposite
I extend my subclass behavior by adjusting the layout of my children based on whether the tab bar has more than one tab or not. If not, it is not shown, when 2+ exist, it is shown.
</comment> <methods> Refactory.Browser.AutohideTabControlComposite <category>testing</category>
shouldShowTabBar ^self tabBar bottomComponent sequence size > 1
</methods> <methods> Refactory.Browser.AutohideTabControlComposite <category>private</category>
computeDisplayBoxFor: aComponent inDisplayBox: aRectangle self shouldShowTabBar ifTrue: [^super computeDisplayBoxFor: aComponent inDisplayBox: aRectangle]. ^aComponent bottomComponent = subCanvas ifTrue: [aRectangle] ifFalse: [Point zero corner: Point zero]
relayout self bounds: self bounds. self invalidate
</methods> <methods> Refactory.Browser.RefactoringBrowser <category>interface opening</category>
addToolsetsTabs | components compositeToWrap containerToInjectInto tabBarView tabComposite | components := self builder window component components. compositeToWrap := (components at: 3) bottomComponent. containerToInjectInto := compositeToWrap container. tabBarView := builder policy tabControlBarClass new. tabBarView textStyle: (TextAttributes styleNamed: #systemDefault). tabBarView model: toolsetsList listHolder. tabBarView selectionChannel: toolsetsList selectionIndexHolder. tabBarView controller keyboardProcessor: builder keyboardProcessor. tabComposite := AutohideTabControlComposite new. "Hook things up so that the appropriate changes are picked up" self toolsets expressInterestIn: #insert: for: [tabComposite relayout] sendBack: #value. self toolsets expressInterestIn: #remove: for: [tabComposite relayout] sendBack: #value. navigator expressInterestIn: nil for: [tabBarView invalidate] sendBack: #value. tabComposite tabBar: tabBarView subCanvas: compositeToWrap border: builder policy tabControlBorder. "do NOT use component: here, as that will nil the container of the tab-wrapped-composite, and we've already updated his container" containerToInjectInto setComponent: tabComposite; composeAndInvalidate
postOpenWith: aBuilder super postOpenWith: aBuilder. self addFind. self addToolsetsTabs. builder window sensor invalidationSuppressWhile: [self updateToolbar]. self currentToolset updateDisplay
</methods> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>TabControlComposite</name> <environment>UI</environment> <super>Graphics.CompositePart</super> <private>false</private> none subCanvas <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>RefactoringBrowser</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.BrowserApplicationModel</super> <private>false</private> none navigator policyClass dispatcher findHolder findList toolbarMenuHolder toolsetsList showToolbarHolder <imports></imports> <category>Browser-RB UI</category> <attributes> <package>Browser-BrowserUI</package> </attributes> </class>