home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
locdialog.tcl
< prev
next >
Wrap
Text File
|
1996-09-16
|
5KB
|
153 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)locdialog.tcl /main/hindenburg/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)locdialog.tcl /main/hindenburg/2 16 Sep 1996 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "definedial.tcl"
Class LocDialog : {DefineDialog} {
constructor
method destructor
method init
method initCompTypes
method load
method save
method clearInterface
method fromInterface
method toInterface
attribute lPage
attribute comps
attribute cadcomps
attribute ccdcomps
attribute dfdcomps
attribute etdcomps
attribute mgdcomps
attribute stdcomps
attribute ucdcomps
attribute phaseDDL
attribute fileDDL
attribute compDDL
attribute labelDDL
attribute condDDL
}
constructor LocDialog {class this name} {
set this [DefineDialog::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method LocDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this DefineDialog::destructor
}
method LocDialog::init {this} {
set cadcomps {cad_class cad_container attribute method parameter
link_attrib nary_assoc generalization overlap_gen
association qualif_assoc nary_assoc_conn
aggregation qualif_aggr propagation}
set ccdcomps {ccd_class ccd_class_ref ccd_container
subject ccd_actor com_message}
set dfdcomps {data_store data_proc dfd_actor
data_flow ctrl_flow update_flow}
set etdcomps {etd_object etd_initiator etd_event}
set mgdcomps {message_def}
set stdcomps {state_action activity state start_state final_state
super_state std_class transition event_msg}
set ucdcomps {use_case ucd_actor und_com_assoc dir_com_assoc}
$this cadcomps "{} $cadcomps"
$this ccdcomps "{} $ccdcomps"
$this dfdcomps "{} $dfdcomps"
$this etdcomps "{} $etdcomps"
$this mgdcomps "{} $mgdcomps"
$this stdcomps "{} $stdcomps"
$this ucdcomps "{} $ucdcomps"
$this comps "{} $cadcomps $ccdcomps $dfdcomps $etdcomps"
$this comps "[$this comps] $mgdcomps $stdcomps $ucdcomps"
# read phases file
getPhases
set phaseList {{}}
foreach phase ${BrowserProcs::phases} {
set phaseType [lindex $phase 1]
lappend_unique phaseList "$phaseType"
}
[$this phaseDDL] entrySet $phaseList
[$this fileDDL] entrySet {{} cad ccd dfd etd mgd std ucd}
[$this fileDDL] selectionChanged "$this initCompTypes"
[$this labelDDL] entrySet \
{{} name qualifier role role_start role_end action event}
[$this condDDL] entrySet {{} KEY NO_KEY INITIATOR}
}
method LocDialog::initCompTypes {this} {
set comps [$this [[$this fileDDL] selected]comps]
[$this compDDL] entrySet $comps
[$this compDDL] selected [lindex $comps 0]
}
method LocDialog::load {this object} {
$this clearInterface
$this curObject $object
$this objName [$object name]
$this toInterface
$this popUp
}
method LocDialog::save {this popDown} {
$this fromInterface
[$this curObject] name [$this objName]
[$this curObject] updateView
[.main editorArea] isChanged 1
if {$popDown == 1} {
$this popDown
}
return 1
}
method LocDialog::clearInterface {this} {
[$this phaseDDL] selected [lindex [[$this phaseDDL] entrySet] 0]
[$this fileDDL] selected [lindex [[$this fileDDL] entrySet] 0]
[$this labelDDL] selected [lindex [[$this labelDDL] entrySet] 0]
[$this condDDL] selected [lindex [[$this condDDL] entrySet] 0]
}
method LocDialog::fromInterface {this} {
[$this curObject] phase [[$this phaseDDL] selected]
[$this curObject] fileType [[$this fileDDL] selected]
[$this curObject] componentType [[$this compDDL] selected]
[$this curObject] labelType [[$this labelDDL] selected]
[$this curObject] condition [[$this condDDL] selected]
}
method LocDialog::toInterface {this} {
[$this phaseDDL] selected [[$this curObject] phase]
[$this fileDDL] selected [[$this curObject] fileType]
[$this compDDL] selected [[$this curObject] componentType]
[$this labelDDL] selected [[$this curObject] labelType]
[$this condDDL] selected [[$this curObject] condition]
}
# Do not delete this line -- regeneration end marker