|
From: Mark R. D. <mdi...@la...> - 2003-03-03 14:00:19
|
No, I think I just mis-understood what setEnabled was for, I thought it
disabled the widget so that the values couldn't be changed in the event
there isn't a "setter" for the parameter itself. Now I see that it only
changes the "capability to edit" the property while the sim is running.
thanks.
As an example case, say I have a boolean parameter and I use the Boolean
PropertyDescriptor to make the presentation into a checkbox for that
value. Is there any "functionality" in the Boolean
PropertyDescriptor/CheckBoxWidget that disables the user being able to
change the state checkbox if there is no "setter" present in the
SimModel class for that parameter/property?
-Mark
Nick Collier wrote:
>I'm not sure exactly what you are asking but the PropertyWidget
>Interface defines a setter -- setEnabled. This is used by
>IntrospectPanel to enable / disable the PropertyWidgets it contains.
>PropertyWidgets are disabled while the simulation is running and then
>enabled on a stop or pause. This seems to work fine, although maybe
>you've found a problem I'm not aware of?
>
>Nick
>
>On Sat, 2003-03-01 at 12:09, Mark R. Diggory wrote:
>
>
>>I'm struggling with how Property Widgets get disabled / enabled in the
>>absence of "setter methods"? I've included a
>>
>>public void setEnabled(boolean b) {
>> table.setEnabled(b);
>> add.setEnabled(b);
>> remove.setEnabled(b);
>> }
>>
>>To enable/disable editing/adding/removing values from the table widget I
>>wrote. But when it comes up in the SettingsFrame, no matter if there's a
>>"setter" method or not for that property, its enabled. Am I missing
>>something?
>>
>>-Mark
>>
>>
>>
>>
>>-------------------------------------------------------
>>This sf.net email is sponsored by:ThinkGeek
>>Welcome to geek heaven.
>>http://thinkgeek.com/sf
>>_______________________________________________
>>Repast-developer mailing list
>>Rep...@li...
>>https://lists.sourceforge.net/lists/listinfo/repast-developer
>>
>>
|