home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)proploceda.tcl /main/hindenburg/1
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)proploceda.tcl /main/hindenburg/1 29 Aug 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- require "proplocobj.tcl"
- require "proplocdia.tcl"
- # End user added include file section
-
- require "custdefsar.tcl"
-
- Class PropLocEdArea : {CustDefsArea} {
- constructor
- method destructor
- method read
- method newObject
- method createObject
- method clearArea
- method getLongName
- method setLongName
- method removeLongName
- method getCntTypeSet
- method setCntTypeSet
- method removeCntTypeSet
- attribute propLocDefiner
- attribute longName
- attribute cntTypeSet
- }
-
- constructor PropLocEdArea {class this name} {
- set this [CustDefsArea::constructor $class $this $name]
- $this longName [Dictionary new]
- $this cntTypeSet [Dictionary new]
- # Start constructor user section
- $this rowCount 12
- $this columnCount 75
- $this font "[m4_var get M4_font -context uce]"
- $this destinationSet "PROPLOC dropEvent"
- $this mode DETAIL
- BrowsHeader new $this.short -label Name -width 17
- BrowsHeader new $this.long -label {Long Name} -width 25
- BrowsHeader new $this.cnt -label {Container Kind} -width 21
- BrowsHeader new $this.cntType -label {Container Type} -width 15
- BrowsHeader new $this.level -label Level -width 15
- BrowsHeader new $this.phase -label {Phase Type} -width 15
- BrowsHeader new $this.file -label {Diagram Type} -width 13
- BrowsHeader new $this.comp -label {Component Type} -width 15
- BrowsHeader new $this.label -label {Label Type} -width 11
- BrowsHeader new $this.cond -label Condition -width 10
- # End constructor user section
- return $this
- }
-
- method PropLocEdArea::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this CustDefsArea::destructor
- }
-
- method PropLocEdArea::read {this object type} {
-
- set locFileName [$this _curName]
- set locFileType [$this _curType]
- set nameLast [expr [string last locs $locFileName] - 1]
- set typeLast [expr [string last locs $locFileType] - 1]
- set defFileName [string range $locFileName 0 $nameLast]defs
- set defFileType [string range $locFileType 0 $typeLast]defs
-
- foreach defLine [$this readConfig $object $defFileName $defFileType] {
- $this setLongName "[lindex $defLine 0]" "[lindex $defLine 1]"
- }
-
- foreach locLine [$this readConfig $object $locFileName $locFileType] {
- set longName [$this getLongName [lindex $locLine 0]]
- if {$longName == ""} {
- set longName "[lindex $locLine 0]"
- }
- set types [$this getCntTypeSet [lindex $locLine 1]]
- if {$types == ""} {
- set types [lindex $locLine 2]
- } else {
- lappend_unique types [lindex $locLine 2]
- }
- $this setCntTypeSet [lindex $locLine 1] [lsort $types]
- $this createObject "shortName \"[lindex $locLine 0]\"
- longName \"$longName\"
- cnt \"[lindex $locLine 1]\"
- cntType \"[lindex $locLine 2]\"
- phase \"[lindex $locLine 3]\"
- fileType \"[lindex $locLine 4]\"
- componentType \"[lindex $locLine 5]\"
- labelType \"[lindex $locLine 6]\"
- condition \"[lindex $locLine 7]\"" \
- $type
- }
- }
-
- method PropLocEdArea::newObject {this name {edit 0}} {
-
- $this isChanged 1
-
- set longName [$this getLongName $name]
-
- set obj [$this createObject "shortName \"$name\"
- longName \"$longName\"
- specLevel \"[$this _level]\"" \
- [$this _level]]
-
- $this sortArea
-
- if $edit {
- $obj open
- }
- }
-
- method PropLocEdArea::createObject {this objSpec level} {
-
- global classCount
- set newIndex [llength [$this objectSet]]
- set object [PropLocObject new $this.Object$classCount $objSpec]
- $object index $newIndex
- incr classCount
-
- $this adjustCreatedObject $object $level
-
- # update the object-details in the view
- $object updateView
-
- return $object
- }
-
- method PropLocEdArea::clearArea {this} {
-
- $this CustDefsArea::clearArea
- foreach longName [[$this longName] names] {
- $this removeLongName $longName
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
- method PropLocEdArea::getLongName {this shortName} {
- return [[$this longName] set $shortName]
- }
-
- method PropLocEdArea::setLongName {this shortName newLongName} {
- [$this longName] set $shortName $newLongName
- }
-
- method PropLocEdArea::removeLongName {this shortName} {
- [$this longName] unset $shortName
- }
-
- method PropLocEdArea::getCntTypeSet {this cntKind} {
- return [[$this cntTypeSet] set $cntKind]
- }
-
- method PropLocEdArea::setCntTypeSet {this cntKind newCntTypeSet} {
- [$this cntTypeSet] set $cntKind $newCntTypeSet
- }
-
- method PropLocEdArea::removeCntTypeSet {this cntKind} {
- [$this cntTypeSet] unset $cntKind
- }
-
-