home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1996
- #
- # File: @(#)csconfigvi.tcl /main/hindenburg/17
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)csconfigvi.tcl /main/hindenburg/17 15 May 1997 Copyright 1996 Cayenne Software Inc.
-
- # Start user added include file section
- require "cstree.tcl"
- # End user added include file section
-
- require "reptoolvie.tcl"
-
- Class CSConfigView : {RepToolView} {
- method destructor
- constructor
- method initialize
- method selectedObjSet
- method selectionChanged
- method update
- method canDelete
- method canReload
- method canChangeServerEntry
- method canChangeParameters
- method canShutdown
- method changeParamMode
- method setFont
- method getFont
- method fileDelete
- method fileReload
- method fileChangeServerEntry
- method fileChangeParameters
- method fileShutdown
- method viewRefreshSelected
- method optionsParamMode
- method helpOnContext
- attribute paramMode
- attribute tree
- attribute info
- }
-
- method CSConfigView::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this RepToolView::destructor
- }
-
- constructor CSConfigView {class this name} {
- set this [RepToolView::constructor $class $this $name repconf]
-
- $this setTitle "Client/Server Configuration" rep_conf_64
- $this firstExposed "$this initialize"
-
- $this paramMode [m4_var get M4_csconfig_parammode]
- if {[$this paramMode] == ""} {
- $this paramMode "Normal"
- }
-
- # Set a small ORB timeout to have little delays caused by trying to
- # access objects serviced by exited brokers or servers.
- #
- [$this rep] quickTimeOut
-
- # Create main interface part.
- #
- interface VerSplitter $this.gui.row {
- CSTree tree {
- columnCount 30
- }
- MultiLineText info {
- editable 0
- columnCount 40
- rowCount 20
- }
- }
-
- $this tree $this.gui.row.tree
- [$this tree] view $this
- [$this tree] selectionChanged "$this selectionChanged"
- [$this tree] font [m4_var get M4_font -context repconf]
-
- $this info $this.gui.row.info
- [$this info] font [m4_var get M4_font -context repconf]
-
- return $this
- }
-
- proc CSConfigView::repToolClass {} {
- return "CSConfigView"
- }
-
- method CSConfigView::initialize {this} {
- busy {
- $this viewRefresh
-
- set root [$this tree].root
- [$this tree] selected $root
- $this selectionChanged
- $root display
- }
- }
-
- method CSConfigView::selectedObjSet {this} {
- return [[$this tree] selected]
- }
-
- method CSConfigView::selectionChanged {this} {
- if [lempty [$this selectedObjSet]] {
- [$this info] text ""
- }
- $this RepToolView::selectionChanged
- }
-
- method CSConfigView::update {this} {
- [$this tree] update
- }
-
- method CSConfigView::canDelete {this} {
- set obj [[$this tree] selected]
- return [$obj canDelete]
- }
-
- method CSConfigView::canReload {this} {
- set obj [[$this tree] selected]
- return [$obj canReload]
- }
-
- method CSConfigView::canChangeServerEntry {this} {
- set obj [[$this tree] selected]
- return [$obj canChangeEntry]
- }
-
- method CSConfigView::canChangeParameters {this} {
- set obj [[$this tree] selected]
- return [$obj canChangeParams]
- }
-
- method CSConfigView::canShutdown {this} {
- set obj [[$this tree] selected]
- return [$obj canShutdown]
- }
-
- method CSConfigView::changeParamMode {this newMode} {
- $this paramMode $newMode
- m4_var set M4_csconfig_parammode $newMode
- [$this tree] update 0
-
- set obj [[$this tree] selected]
- if ![lempty $obj] {
- $obj display
- }
- }
-
- method CSConfigView::setFont {this font} {
- [$this tree] font $font
- [$this info] font $font
-
- $this RepToolView::setFont $font
- }
-
- method CSConfigView::getFont {this} {
- return [[$this tree] font]
- }
-
- method CSConfigView::fileDelete {this} {
- [[$this tree] selected] removeEntry
- }
-
- method CSConfigView::fileReload {this} {
- [[$this tree] selected] reload
- }
-
- method CSConfigView::fileChangeServerEntry {this} {
- [[$this tree] selected] changeEntry
- }
-
- method CSConfigView::fileChangeParameters {this} {
- [[$this tree] selected] changeParameters
- }
-
- method CSConfigView::fileShutdown {this} {
- [[$this tree] selected] shutdown
- }
-
- method CSConfigView::viewRefreshSelected {this} {
- set obj [[$this tree] selected]
- $obj update 0
- $obj display
- }
-
- method CSConfigView::optionsParamMode {this} {
- set dlg [ListDialog new $this.optionsparammode \
- -title "Parameter Display Mode" \
- -message "Change Parameter Display Mode" \
- -selectionPolicy "BROWSE" \
- -modal 1]
-
- if $win95 {
- $dlg entrySet { "Normal" "Meta4" }
- } else {
- $dlg entrySet { "Normal" "Meta4" "Sh" "Csh" }
- }
- $dlg rowCount [llength [$dlg entrySet]]
- $dlg selectedSet [$this paramMode]
-
- $dlg okPressed "
- $this changeParamMode \[%this selectedSet]
- %this delete
- "
- $dlg helpPressed "$this helpOnName changeParamMode"
- $dlg popUp
- }
-
- method CSConfigView::helpOnContext {this} {
- set selected [[$this tree] selected]
- if {$selected != ""} {
- $this helpOnName "selected[$selected objType]"
- } else {
- $this helpOnName repToolCSConfigView
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
-