home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)proploceda.tcl /main/titanic/5
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)proploceda.tcl /main/titanic/5 31 Oct 1997 Copyright 1997 Cayenne Software 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 parseLines
- method parseDefs
- method newObject
- method createObject
- method clearArea
- method getLongName
- method setLongName
- method removeLongName
- method getCntTypeSet
- method setCntTypeSet
- method removeCntTypeSet
- attribute areaCleared
- attribute propLocDefiner
- attribute longName
- attribute cntTypeSet
- }
-
- constructor PropLocEdArea {class this name} {
- set this [CustDefsArea::constructor $class $this $name]
- $this areaCleared 0
- $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 25
- 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} {
- $this readDefs $object $type
- $this CustDefsArea::read $object $type
- }
-
- method PropLocEdArea::parseLines {this lines level} {
- foreach locLine $lines {
- set longName [$this getLongName [lindex $locLine 0]]
- if {$longName == ""} {
- set longName [lindex $locLine 0]
- }
- set types [$this getCntTypeSet [lindex $locLine 1]]
- if {[lindex $locLine 2] != ""} {
- lappend_unique types [lindex $locLine 2]
- }
- $this setCntTypeSet [lindex $locLine 1] [lsort $types]
- $this createObject [list 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]] \
- $level
- }
- }
-
- method PropLocEdArea::parseDefs {this lines level} {
- foreach defLine $lines {
- $this setLongName [lindex $defLine 0] [lindex $defLine 1]
- }
- }
-
- method PropLocEdArea::newObject {this name {edit 0}} {
-
- $this isChanged 1
-
- set longName [$this getLongName $name]
-
- set obj [$this createObject [list 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 areaCleared 1
- $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
- }
-
-