# HG changeset patch # User Claus Gittinger # Date 1422553301 -3600 # Node ID 2fce587be425e49f545f26baffe9300422c20b2d # Parent a994c267e55e2949e4e5f8a0fa031e94a18a5f89 class: DialogBox comment/format in:6 methods diff -r a994c267e55e -r 2fce587be425 DialogBox.st --- a/DialogBox.st Mon Jan 26 15:47:46 2015 +0100 +++ b/DialogBox.st Thu Jan 29 18:41:41 2015 +0100 @@ -11,6 +11,8 @@ " "{ Package: 'stx:libwidg' }" +"{ NameSpace: Smalltalk }" + ModalBox subclass:#DialogBox instanceVariableNames:'buttonPanel okButton okAction abortButton abortAction acceptReturnAsOK yPosition leftIndent rightIndent addedComponents @@ -7135,18 +7137,18 @@ addLabelledField:aView label:labelString adjust:labelAdjust tabable:tabable from:leftX to:rightX separateAtX:relativeX "add a label and some view side-by-side. - The labels goes from 0.0 to relativeX; the inputField from relativeX to 1.0. - The labels string is defined by labelString and adjusted according to labelAdjust. + The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0. + The label's string is defined by labelString and adjusted according to labelAdjust. The inputField gets model as its model. Return the inputField." ^ self - addLabelledField:aView - label:labelString - adjust:labelAdjust - tabable:tabable - from:leftX to:rightX separateAtX:relativeX - nameAs:nil + addLabelledField:aView + label:labelString + adjust:labelAdjust + tabable:tabable + from:leftX to:rightX separateAtX:relativeX + nameAs:nil " |dialog model field| @@ -7156,10 +7158,10 @@ dialog := DialogBox new. field := dialog - addLabelledField:(EditField on:model) label:'input here:' - adjust:#left - tabable:true - separateAtX:0.3. + addLabelledField:(EditField on:model) label:'input here:' + adjust:#left + tabable:true + separateAtX:0.3. dialog addAbortButton; addOkButton. dialog open. @@ -7176,10 +7178,10 @@ dialog := DialogBox new. field := dialog - addLabelledField:(PopUpList on:model) label:'select here:' - adjust:#left - tabable:true - separateAtX:0.3. + addLabelledField:(PopUpList on:model) label:'select here:' + adjust:#left + tabable:true + separateAtX:0.3. dialog addAbortButton; addOkButton. dialog open. @@ -7194,8 +7196,8 @@ tabable:tabable from:leftX to:rightX separateAtX:relativeX nameAs:aName "add a label and some view side-by-side. - The labels goes from 0.0 to relativeX; the inputField from relativeX to 1.0. - The labels string is defined by labelString and adjusted according to labelAdjust. + The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0. + The label's string is defined by labelString and adjusted according to labelAdjust. The inputField gets model as its model. Return the inputField." @@ -7277,8 +7279,8 @@ foregroundColor:fgColor "add a label and some view side-by-side. - The labels goes from 0.0 to relativeX; the inputField from relativeX to 1.0. - The labels string is defined by labelString and adjusted according to labelAdjust. + The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0. + The label's string is defined by labelString and adjusted according to labelAdjust. The inputField gets model as its model. Return the inputField." @@ -7415,18 +7417,18 @@ addLabelledField:aView label:labelString adjust:labelAdjust tabable:tabable separateAtX:relativeX "add a label and some view side-by-side. - The labels goes from 0.0 to relativeX; the inputField from relativeX to 1.0. - The labels string is defined by labelString and adjusted according to labelAdjust. + The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0. + The label's string is defined by labelString and adjusted according to labelAdjust. The inputField gets model as its model. Return the inputField." ^ self - addLabelledField:aView - label:labelString - adjust:labelAdjust - tabable:tabable - from:0.0 to:1.0 - separateAtX:relativeX + addLabelledField:aView + label:labelString + adjust:labelAdjust + tabable:tabable + from:0.0 to:1.0 + separateAtX:relativeX "/ |y lbl max| "/ @@ -7457,10 +7459,10 @@ dialog := DialogBox new. field := dialog - addLabelledField:(EditField on:model) label:'input here:' - adjust:#left - tabable:true - separateAtX:0.3. + addLabelledField:(EditField on:model) label:'input here:' + adjust:#left + tabable:true + separateAtX:0.3. dialog addAbortButton; addOkButton. dialog open. @@ -7477,10 +7479,10 @@ dialog := DialogBox new. field := dialog - addLabelledField:(PopUpList on:model) label:'select here:' - adjust:#left - tabable:true - separateAtX:0.3. + addLabelledField:(PopUpList on:model) label:'select here:' + adjust:#left + tabable:true + separateAtX:0.3. dialog addAbortButton; addOkButton. dialog open. @@ -8519,18 +8521,18 @@ addLabelledInputField:labelString adjust:labelAdjust on:model tabable:tabable from:leftX to:rightX separateAtX:relativeX "add a label and an inputField side-by-side. - The labels goes from 0.0 to relativeX; the inputField from relativeX to 1.0. - The labels string is defined by labelString and adjusted according to labelAdjust. + The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0. + The label's string is defined by labelString and adjusted according to labelAdjust. The inputField gets model as its model. Return the inputField." ^ self - addLabelledField:(EditField on:model) label:labelString - adjust:labelAdjust - tabable:tabable - from:leftX to:rightX - separateAtX:relativeX. + addLabelledField:(EditField on:model) label:labelString + adjust:labelAdjust + tabable:tabable + from:leftX to:rightX + separateAtX:relativeX. " |dialog model field| @@ -8540,11 +8542,11 @@ dialog := DialogBox new. field := dialog - addLabelledInputField:'enter a string' - adjust:#left - on:model - tabable:true - separateAtX:0.3. + addLabelledInputField:'enter a string' + adjust:#left + on:model + tabable:true + separateAtX:0.3. dialog addAbortButton; addOkButton. dialog open. @@ -8563,24 +8565,24 @@ dialog addHorizontalLine. field := dialog - addLabelledInputField:'string1:' - adjust:#right - on:model1 - tabable:true - separateAtX:0.4. + addLabelledInputField:'string1:' + adjust:#right + on:model1 + tabable:true + separateAtX:0.4. field := dialog - addLabelledInputField:'string2:' - adjust:#right - on:model2 - tabable:true - separateAtX:0.4. + addLabelledInputField:'string2:' + adjust:#right + on:model2 + tabable:true + separateAtX:0.4. dialog addAbortButton; addOkButton. dialog open. dialog accepted ifTrue:[ - Transcript showCR:model1 value. - Transcript showCR:model2 value. + Transcript showCR:model1 value. + Transcript showCR:model2 value. ]. " @@ -8590,17 +8592,17 @@ addLabelledInputField:labelString adjust:labelAdjust on:model tabable:tabable separateAtX:relativeX "add a label and an inputField side-by-side. - The labels goes from 0.0 to relativeX; the inputField from relativeX to 1.0. - The labels string is defined by labelString and adjusted according to labelAdjust. + The label goes from 0.0 to relativeX; the inputField from relativeX to 1.0. + The label's string is defined by labelString and adjusted according to labelAdjust. The inputField gets model as its model. Return the inputField." ^ self - addLabelledField:(EditField on:model) label:labelString - adjust:labelAdjust - tabable:tabable - separateAtX:relativeX. + addLabelledField:(EditField on:model) label:labelString + adjust:labelAdjust + tabable:tabable + separateAtX:relativeX. " |dialog model field| @@ -8610,11 +8612,11 @@ dialog := DialogBox new. field := dialog - addLabelledInputField:'enter a string' - adjust:#left - on:model - tabable:true - separateAtX:0.3. + addLabelledInputField:'enter a string' + adjust:#left + on:model + tabable:true + separateAtX:0.3. dialog addAbortButton; addOkButton. dialog open. @@ -8633,24 +8635,24 @@ dialog addHorizontalLine. field := dialog - addLabelledInputField:'string1:' - adjust:#right - on:model1 - tabable:true - separateAtX:0.4. + addLabelledInputField:'string1:' + adjust:#right + on:model1 + tabable:true + separateAtX:0.4. field := dialog - addLabelledInputField:'string2:' - adjust:#right - on:model2 - tabable:true - separateAtX:0.4. + addLabelledInputField:'string2:' + adjust:#right + on:model2 + tabable:true + separateAtX:0.4. dialog addAbortButton; addOkButton. dialog open. dialog accepted ifTrue:[ - Transcript showCR:model1 value. - Transcript showCR:model2 value. + Transcript showCR:model1 value. + Transcript showCR:model2 value. ]. " @@ -10250,11 +10252,11 @@ !DialogBox class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.360 2014-11-28 12:35:28 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.361 2015-01-29 17:41:41 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.360 2014-11-28 12:35:28 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.361 2015-01-29 17:41:41 cg Exp $' ! !