home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
cadpanel.tcl
< prev
next >
Wrap
Text File
|
1997-09-30
|
3KB
|
114 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)cadpanel.tcl /main/titanic/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)cadpanel.tcl /main/titanic/6 30 Sep 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require edcontrolp.tcl
# End user added include file section
require "extendedco.tcl"
Class CADPanel : {ExtendedControlPanel} {
constructor
method destructor
method updateArea
method createPanelExtension
method initialize
attribute startPanel
attribute endPanel
}
constructor CADPanel {class this name} {
set this [ExtendedControlPanel::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method CADPanel::destructor {this} {
# Start destructor user section
# End destructor user section
$this ExtendedControlPanel::destructor
}
method CADPanel::updateArea {this args} {
if { [llength $args] == 0 } {
$this updateArea start
$this updateArea end
return
}
set side [lindex $args 0]
if { [m4_var get M4_diagram_look] == "OMT" } {
set multIndex [expr [string length $side] + 1]
set mult [string range [$this.mult.$side selected] $multIndex end]
} else {
regsub -all "_uml" [$this.mult.$side selected] "" mult
}
if { $side == "start" } {
[$this _area] currentStartMultiplicity $mult
} else {
[$this _area] currentEndMultiplicity $mult
}
}
method CADPanel::createPanelExtension {this} {
# todo: optimize with initialize()
# be carefull with layout problems
if { [m4_var get M4_diagram_look] == "OMT" } {
set startEntrySet {start_one start_optional start_many}
set endEntrySet {end_one end_optional end_many}
} else {
set startEntrySet {one_uml optional_uml many_uml}
set endEntrySet $startEntrySet
}
DlgRow new $this.mult
$this.mult allowResize 1
$this startPanel [VerControlPanel new $this.mult.start \
-entrySet $startEntrySet \
-tipSet {"Begin Mandatory Association" \
"Begin Optional Association" \
"Begin Many Association"} \
-selected [lindex $startEntrySet 0] \
-selectionChanged "$this updateArea start" \
-allowResize 1
]
$this endPanel [VerControlPanel new $this.mult.end \
-entrySet $endEntrySet \
-tipSet {"End Mandatory Association" \
"End Optional Association" \
"End Many Association"} \
-selected [lindex $endEntrySet 0] \
-selectionChanged "$this updateArea end" \
-allowResize 1
]
}
method CADPanel::initialize {this edType} {
[$this symbPanel] initialize $edType
$this ExtendedControlPanel::initialize $edType
if { [m4_var get M4_diagram_look] == "OMT" } {
set startEntrySet {start_one start_optional start_many}
set endEntrySet {end_one end_optional end_many}
} else {
set startEntrySet {one_uml optional_uml many_uml}
set endEntrySet $startEntrySet
}
[$this startPanel] entrySet $startEntrySet
[$this startPanel] selected [lindex $startEntrySet 0]
[$this endPanel] entrySet $endEntrySet
[$this endPanel] selected [lindex $endEntrySet 0]
$this updateArea
}
# Do not delete this line -- regeneration end marker