This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 33994

Summary: EventProperty.EventEditor extends deprecated EnhancedPropertyEditor and will not work correctly with the property sheet rewrite
Product: guibuilder Reporter: _ tboudreau <tboudreau>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: TASK Exception Reporter:
Bug Depends on: 26367    
Bug Blocks: 26350    

Description _ tboudreau 2003-05-29 01:59:59 UTC
The new PropertySheet implementation provides a
wrapper
InplaceEditor that *tries* to work with the
inplace editors
supplied by this interface.  Since the contract for 
taking the value is now pressing Enter, not just
looking
for a FOCUS_LOST event, I've done some very weird
things 
with introspecting addActionListener methods and
faking
focus lost events to get it to work.  

However, these hacks are not always reliable, and
the look
of the combo box does not match the other combo
boxes in
the property sheet.

This class could easily be rewritten as an
ExPropertyEditor
and get rid of the custom editor component entirely - 
just return TRUE from
Property.getValue("canEditAsText")
and supply any matching methods from getTags.
Comment 1 Tomas Pavek 2003-07-21 12:28:24 UTC
As discussed in issue 26367, the functionality of custom in-place
editor still cannot be substituted by standard means. We need to
investigate this further.
Comment 2 _ tboudreau 2003-11-16 12:06:51 UTC
See my comments to issue 26367 - this should be possible as soon as I
merge the PropertyPanel rewrite branch.
Comment 3 _ tboudreau 2004-01-30 23:02:27 UTC
FYI, you can now supply an initial value for editing via

someProperty.getValue("initialEditValue")

(it must be a string).  So that should take care of the last reason we can't kill the older 
editors.

Note:  Be *careful* not to return anything from getValue('initialEditValue") if the event 
handler already has a real event handler you want to show - the editors will prefer the 
initial value to anything they get from the property editor, so you only want to do this 
when the property value has not been set to a real value.
Comment 4 Tomas Pavek 2004-02-05 17:13:28 UTC
Done. The custom in-place editor eliminated.

/cvs/form/src/org/netbeans/modules/form/EventProperty.java
new revision: 1.18; previous revision: 1.17
Comment 5 _ tboudreau 2004-02-05 20:15:05 UTC
Amen!  Welcome to the brave new world!