Skip to content

Commit c18fe61

Browse files
authored
Merge pull request #437 from NetLogo/model-resizing
adjusting widget sizes
2 parents 25ce385 + 0afd37b commit c18fe61

9 files changed

Lines changed: 199 additions & 199 deletions

File tree

Sample Models/Art/Follower.nlogox

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,8 @@ end
6565
; Copyright 1998 Uri Wilensky.
6666
; See Info tab for full copyright and license.</code>
6767
<widgets>
68-
<view x="318" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="-30" height="492" showTickCounter="true" patchSize="8.0" fontSize="10" wrappingAllowedY="true" width="492" tickCounterLabel="ticks" maxPycor="30" updateMode="1" maxPxcor="30" minPxcor="-30"></view>
69-
<button x="153" y="73" height="33" disableUntilTicks="true" forever="true" kind="Observer" display="go" width="87" sizeVersion="0">go</button>
70-
<button x="53" y="73" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="setup" width="85" sizeVersion="0">setup</button>
71-
<slider x="73" step="1.0" y="186" max="359.0" display="waver" height="33" min="0.0" direction="Horizontal" default="70.0" variable="waver" width="150" sizeVersion="0"></slider>
72-
<slider x="73" step="1.0" y="151" max="50.0" display="far-radius" height="33" min="0.0" direction="Horizontal" default="10.0" variable="far-radius" width="150" sizeVersion="0"></slider>
73-
<slider x="52" step="10" y="33" max="10000" display="population" height="33" min="0" direction="Horizontal" default="1500.0" variable="population" width="188" sizeVersion="0"></slider>
74-
<slider x="73" step="1.0" y="116" max="50.0" display="near-radius" height="33" min="0.0" direction="Horizontal" default="5.0" variable="near-radius" width="150" sizeVersion="0"></slider>
75-
<plot x="5" autoPlotX="true" yMax="350.0" autoPlotY="true" yAxis="#" y="232" xMin="0.0" height="297" legend="true" xMax="50.0" yMin="0.0" xAxis="time" display="Turtle Count" width="308" sizeVersion="0">
68+
<view x="390" wrappingAllowedX="true" y="8" frameRate="30.0" minPycor="-30" height="492" showTickCounter="true" patchSize="8.0" fontSize="10" wrappingAllowedY="true" width="492" tickCounterLabel="ticks" maxPycor="30" updateMode="1" maxPxcor="30" minPxcor="-30"></view>
69+
<plot x="12" autoPlotX="true" yMax="350.0" autoPlotY="true" yAxis="#" y="275" xMin="0.0" height="304" legend="true" xMax="50.0" yMin="0.0" width="370" xAxis="time" display="Turtle Count">
7670
<setup>set-plot-y-range 0 population</setup>
7771
<update></update>
7872
<pen interval="1.0" mode="0" display="unattached" color="-5825686" legend="true">
@@ -92,6 +86,12 @@ end
9286
<update>plot count turtles with [color = lime]</update>
9387
</pen>
9488
</plot>
89+
<slider x="102" step="10" y="10" max="10000" width="188" display="population" height="50" min="0" direction="Horizontal" default="1500.0" variable="population"></slider>
90+
<slider x="102" step="1.0" y="107" max="50.0" width="188" display="near-radius" height="50" min="0.0" direction="Horizontal" default="5.0" variable="near-radius"></slider>
91+
<button x="203" y="66" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="87" display="go">go</button>
92+
<button x="102" y="66" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="85" display="setup">setup</button>
93+
<slider x="102" step="1.0" y="163" max="50.0" width="188" display="far-radius" height="50" min="0.0" direction="Horizontal" default="10.0" variable="far-radius"></slider>
94+
<slider x="102" step="1.0" y="219" max="359.0" width="188" display="waver" height="50" min="0.0" direction="Horizontal" default="70.0" variable="waver"></slider>
9595
</widgets>
9696
<info><![CDATA[## WHAT IS IT?
9797

Sample Models/Biology/Heatbugs.nlogox

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -160,38 +160,38 @@ end
160160
; See Info tab for full copyright and license.]]></code>
161161
<widgets>
162162
<view x="371" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="0" height="404" showTickCounter="true" patchSize="4.0" fontSize="10" wrappingAllowedY="true" width="404" tickCounterLabel="ticks" maxPycor="99" updateMode="1" maxPxcor="99" minPxcor="0"></view>
163-
<slider x="14" step="1" y="30" max="500" display="bug-count" height="33" min="1" direction="Horizontal" default="100.0" variable="bug-count" units="bugs" width="262" sizeVersion="0"></slider>
164-
<button x="27" y="177" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="69" sizeVersion="0">setup</button>
165-
<button x="98" y="177" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="68" sizeVersion="0">go</button>
166-
<slider x="164" step="0.01" y="236" max="1" display="evaporation-rate" height="33" min="0" direction="Horizontal" default="0.01" variable="evaporation-rate" width="193" sizeVersion="0"></slider>
167-
<slider x="164" step="0.1" y="270" max="1" display="diffusion-rate" height="33" min="0" direction="Horizontal" default="0.9" variable="diffusion-rate" width="193" sizeVersion="0"></slider>
168-
<slider x="164" step="1.0" y="305" max="100" display="random-move-chance" height="33" min="0" direction="Horizontal" default="0.0" variable="random-move-chance" units="%" width="193" sizeVersion="0"></slider>
169-
<plot x="14" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="unhappiness" y="354" xMin="0.0" height="159" legend="false" xMax="100.0" yMin="0.0" xAxis="time" display="Avg. Bug Unhappiness" width="344" sizeVersion="0">
163+
<slider x="14" step="1" y="30" max="500" width="262" display="bug-count" height="50" min="1" direction="Horizontal" default="100.0" variable="bug-count" units="bugs"></slider>
164+
<button x="27" y="228" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="69">setup</button>
165+
<button x="98" y="228" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="68">go</button>
166+
<slider x="164" step="0.01" y="289" max="1" width="193" display="evaporation-rate" height="50" min="0" direction="Horizontal" default="0.01" variable="evaporation-rate"></slider>
167+
<slider x="164" step="0.1" y="340" max="1" width="193" display="diffusion-rate" height="50" min="0" direction="Horizontal" default="0.9" variable="diffusion-rate"></slider>
168+
<slider x="164" step="1.0" y="392" max="100" width="193" display="random-move-chance" height="50" min="0" direction="Horizontal" default="0.0" variable="random-move-chance" units="%"></slider>
169+
<slider x="14" step="1" y="86" max="200" width="172" display="min-ideal-temp" height="50" min="0" direction="Horizontal" default="10.0" variable="min-ideal-temp"></slider>
170+
<slider x="189" step="1" y="142" max="100" width="173" display="max-output-heat" height="50" min="0" direction="Horizontal" default="25.0" variable="max-output-heat"></slider>
171+
<slider x="189" step="1" y="86" max="100" width="173" display="min-output-heat" height="50" min="0" direction="Horizontal" default="5.0" variable="min-output-heat"></slider>
172+
<button x="179" y="228" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="92">deep-freeze</button>
173+
<button x="274" y="228" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="88">heat-up</button>
174+
<note x="10" y="10" backgroundDark="0" fontSize="11" width="150" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Initial settings for bugs</note>
175+
<note x="13" y="283" backgroundDark="0" fontSize="11" width="127" markdown="false" height="28" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Other parameters</note>
176+
<note x="12" y="207" backgroundDark="0" fontSize="11" width="150" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Actions</note>
177+
<note x="12" y="304" backgroundDark="0" fontSize="11" width="141" markdown="false" height="29" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">(OK to change
178+
during run)</note>
179+
<note x="376" y="429" backgroundDark="0" fontSize="11" width="83" markdown="false" height="30" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Color bug by:</note>
180+
<button x="694" y="457" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="137">reset-perspective</button>
181+
<button x="573" y="459" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="118" display="watch happiest">watch min-one-of turtles [ unhappiness ]</button>
182+
<button x="462" y="459" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="107" display="watch saddest">watch max-one-of turtles [ unhappiness ]</button>
183+
<button x="573" y="421" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="116" display="happiness">set color-by-unhappiness? true</button>
184+
<button x="462" y="421" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="106" display="ideal-temp">set color-by-unhappiness? false
185+
ask turtles [ color-by-ideal-temp ]</button>
186+
<plot x="787" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="unhappiness" y="10" xMin="0.0" height="235" legend="false" xMax="100.0" yMin="0.0" width="371" xAxis="time" display="Avg. Bug Unhappiness">
170187
<setup></setup>
171188
<update></update>
172189
<pen interval="1.0" mode="0" display="default" color="-16777216" legend="true">
173190
<setup></setup>
174191
<update>plot mean [unhappiness] of turtles</update>
175192
</pen>
176193
</plot>
177-
<slider x="14" step="1" y="69" max="200" display="min-ideal-temp" height="33" min="0" direction="Horizontal" default="10.0" variable="min-ideal-temp" width="172" sizeVersion="0"></slider>
178-
<slider x="14" step="1" y="102" max="200" display="max-ideal-temp" height="33" min="0" direction="Horizontal" default="40.0" variable="max-ideal-temp" width="172" sizeVersion="0"></slider>
179-
<slider x="189" step="1" y="102" max="100" display="max-output-heat" height="33" min="0" direction="Horizontal" default="25.0" variable="max-output-heat" width="173" sizeVersion="0"></slider>
180-
<slider x="189" step="1" y="69" max="100" display="min-output-heat" height="33" min="0" direction="Horizontal" default="5.0" variable="min-output-heat" width="173" sizeVersion="0"></slider>
181-
<button x="179" y="177" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="92" sizeVersion="0">deep-freeze</button>
182-
<button x="274" y="177" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="88" sizeVersion="0">heat-up</button>
183-
<note x="10" y="10" height="18" textColorLight="-16777216" fontSize="11" width="150" markdown="false">Initial settings for bugs</note>
184-
<note x="13" y="230" height="28" textColorLight="-16777216" fontSize="11" width="127" markdown="false">Other parameters</note>
185-
<note x="12" y="156" height="18" textColorLight="-16777216" fontSize="11" width="150" markdown="false">Actions</note>
186-
<note x="12" y="251" height="29" textColorLight="-16777216" fontSize="11" width="141" markdown="false">(OK to change
187-
during run)</note>
188-
<button x="462" y="445" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="ideal-temp" width="106" sizeVersion="0">set color-by-unhappiness? false
189-
ask turtles [ color-by-ideal-temp ]</button>
190-
<button x="573" y="445" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="happiness" width="116" sizeVersion="0">set color-by-unhappiness? true</button>
191-
<note x="376" y="453" height="30" textColorLight="-16777216" fontSize="11" width="83" markdown="false">Color bug by:</note>
192-
<button x="462" y="481" height="33" disableUntilTicks="true" forever="false" kind="Observer" display="watch saddest" width="107" sizeVersion="0">watch max-one-of turtles [ unhappiness ]</button>
193-
<button x="573" y="481" height="33" disableUntilTicks="true" forever="false" kind="Observer" display="watch happiest" width="118" sizeVersion="0">watch min-one-of turtles [ unhappiness ]</button>
194-
<button x="694" y="481" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="137" sizeVersion="0">reset-perspective</button>
194+
<slider x="14" step="1" y="142" max="200" width="172" display="max-ideal-temp" height="50" min="0" direction="Horizontal" default="40.0" variable="max-ideal-temp"></slider>
195195
</widgets>
196196
<info><![CDATA[## WHAT IS IT?
197197

Sample Models/Biology/Invasive Plants.nlogox

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<model version="NetLogo 7.0.0-beta2" snapToGrid="false">
2+
<model version="NetLogo 7.0.0-beta2" snapToGrid="true">
33
<code><![CDATA[breed [ seeds seed ]
44
breed [ resistance-blocks resistance-block ]
55
@@ -175,29 +175,13 @@ end
175175
; See Info tab for full copyright and license.]]></code>
176176
<widgets>
177177
<view x="300" wrappingAllowedX="false" y="7" frameRate="30.0" minPycor="-16" height="664" showTickCounter="true" patchSize="20.0" fontSize="10" wrappingAllowedY="false" width="664" tickCounterLabel="years" maxPycor="16" updateMode="1" maxPxcor="16" minPxcor="-16"></view>
178-
<button x="5" y="340" height="55" disableUntilTicks="true" forever="false" kind="Observer" display="go-once" width="75" sizeVersion="0">go</button>
179178
<switch x="170" y="345" height="45" on="true" variable="show-seeds?" width="120" display="show-seeds?"></switch>
180179
<slider x="5" step="0.01" y="572" max="1" width="285" display="seed-production-rate" height="55" min="0" direction="Horizontal" default="0.05" variable="seed-production-rate"></slider>
181180
<slider x="5" step="0.5" y="629" max="10" width="285" display="spread-distance" height="55" min="0" direction="Horizontal" default="1.0" variable="spread-distance"></slider>
182181
<slider x="5" step="1" y="458" max="100" width="285" display="weed-killer-threshold" height="55" min="0" direction="Horizontal" default="66.0" variable="weed-killer-threshold"></slider>
183182
<slider x="5" step="0.01" y="515" max="1" width="285" display="weed-killer-effectiveness" height="55" min="0" direction="Horizontal" default="0.95" variable="weed-killer-effectiveness"></slider>
184-
<button x="85" y="340" height="55" disableUntilTicks="true" forever="true" kind="Observer" width="80" sizeVersion="0">go</button>
185-
<slider x="5" step="0.01" y="7" max="1" width="285" display="initial-density" height="55" min="0" direction="Horizontal" default="0.01" variable="initial-density"></slider>
183+
<button x="85" y="340" height="55" disableUntilTicks="true" forever="true" kind="Observer" width="80">go</button>
186184
<slider x="5" step="1" y="401" max="30" width="285" display="weed-killer-rate" height="55" min="0" direction="Horizontal" default="5.0" variable="weed-killer-rate"></slider>
187-
<button x="205" y="255" height="55" disableUntilTicks="true" forever="false" kind="Observer" display="clear " width="85" sizeVersion="0">clear-patches
188-
ask resistance-blocks [die]</button>
189-
<button x="205" y="197" height="55" disableUntilTicks="true" forever="true" kind="Observer" width="85" sizeVersion="0">draw</button>
190-
<button x="205" y="72" height="55" disableUntilTicks="false" forever="false" kind="Observer" width="85" sizeVersion="0">setup</button>
191-
<chooser x="5" y="70" height="55" variable="initial-resistance-shape" current="1" width="195" display="initial-resistance-shape">
192-
<choice type="string" value="none"></choice>
193-
<choice type="string" value="plus"></choice>
194-
<choice type="string" value="circle"></choice>
195-
</chooser>
196-
<chooser x="5" y="197" height="55" variable="draw-mode" current="1" width="195" display="draw-mode">
197-
<choice type="string" value="infestation"></choice>
198-
<choice type="string" value="resistance"></choice>
199-
</chooser>
200-
<slider x="5" step="1" y="255" max="100" width="195" display="draw-value" height="55" min="0" direction="Horizontal" default="100.0" variable="draw-value"></slider>
201185
<plot x="985" autoPlotX="true" yMax="1000.0" autoPlotY="true" yAxis="patches" y="330" xMin="0.0" height="310" legend="false" xMax="100.0" yMin="0.0" width="320" xAxis="infestation" display="infestation levels">
202186
<setup></setup>
203187
<update></update>
@@ -209,7 +193,7 @@ ask resistance-blocks [die]</button>
209193
histogram [min list 99 infestation] of patches</update>
210194
</pen>
211195
</plot>
212-
<button x="1045" y="645" height="35" disableUntilTicks="false" forever="false" kind="Observer" display="clear plots" width="200" sizeVersion="0">clear-all-plots</button>
196+
<button x="1045" y="645" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="200" display="clear plots">clear-all-plots</button>
213197
<plot x="985" autoPlotX="true" yMax="50000.0" autoPlotY="true" yAxis="infestation" y="7" xMin="0.0" height="310" legend="false" xMax="10.0" yMin="0.0" width="320" xAxis="ticks" display="aggregate infestation">
214198
<setup></setup>
215199
<update></update>
@@ -218,9 +202,25 @@ histogram [min list 99 infestation] of patches</update>
218202
<update>plot sum [infestation] of patches</update>
219203
</pen>
220204
</plot>
221-
<note x="5" y="160" backgroundDark="0" fontSize="12" width="285" markdown="false" height="41" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Use draw button to then click and draw on the view to add resistance or infestation.</note>
222-
<note x="5" y="137" backgroundDark="0" fontSize="14" width="285" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Draw Infestation/Resistance</note>
223205
<note x="5" y="315" backgroundDark="-15329770" fontSize="12" width="298" markdown="false" height="25" textColorDark="-1" textColorLight="-16777216" backgroundLight="2125023">___________________________________________________</note>
206+
<slider x="5" step="0.01" y="5" max="1" width="285" display="initial-density" height="55" min="0" direction="Horizontal" default="0.01" variable="initial-density"></slider>
207+
<chooser x="5" y="65" height="60" variable="initial-resistance-shape" current="1" width="195" display="initial-resistance-shape">
208+
<choice type="string" value="none"></choice>
209+
<choice type="string" value="plus"></choice>
210+
<choice type="string" value="circle"></choice>
211+
</chooser>
212+
<button x="205" y="65" height="55" disableUntilTicks="false" forever="false" kind="Observer" width="85">setup</button>
213+
<note x="5" y="135" backgroundDark="0" fontSize="14" width="285" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Draw Infestation/Resistance</note>
214+
<note x="5" y="155" backgroundDark="0" fontSize="12" width="285" markdown="false" height="41" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Use draw button to then click and draw on the view to add resistance or infestation.</note>
215+
<button x="205" y="200" height="55" disableUntilTicks="true" forever="true" kind="Observer" width="85">draw</button>
216+
<chooser x="5" y="200" height="60" variable="draw-mode" current="1" width="195" display="draw-mode">
217+
<choice type="string" value="infestation"></choice>
218+
<choice type="string" value="resistance"></choice>
219+
</chooser>
220+
<slider x="5" step="1" y="265" max="100" width="195" display="draw-value" height="55" min="0" direction="Horizontal" default="100.0" variable="draw-value"></slider>
221+
<button x="205" y="260" height="55" disableUntilTicks="true" forever="false" kind="Observer" width="85" display="clear ">clear-patches
222+
ask resistance-blocks [die]</button>
223+
<button x="5" y="340" height="55" disableUntilTicks="true" forever="false" kind="Observer" width="75" display="go-once">go</button>
224224
</widgets>
225225
<info><![CDATA[## WHAT IS IT?
226226

0 commit comments

Comments
 (0)