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 239661 - Allow the insertion of Swing components both into the renderers and into the editors of property values
Summary: Allow the insertion of Swing components both into the renderers and into the ...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Property Sheet (show other bugs)
Version: 7.4
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: Stanislav Aubrecht
URL: http://forums.netbeans.org/topic58021...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-19 15:57 UTC by gouessej
Modified: 2013-12-19 15:58 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gouessej 2013-12-19 15:57:34 UTC
It is not yet possible to insert a Swing component into both the renderer and the editor of a property value without hiding the existing ones (or I have found no "simple" way of doing that).

It is possible to use the same JComponent both as a renderer and an editor but then you lose the benefits of using build-in ones:
ftp://ftp.hq.eso.org/projects/acs.orig/Releases/ACS-7_0_1/Distribution/Linux-NO-LGPL/ACS/LGPL/CommonSoftware/ACSLaser/gp/src/cern/gp/beans/editors/ButtonEditor.java

It is currently possible to:
- open a custom editor by overriding both PropertyEditor.getCustomEditor() and PropertyEditor.supportsCustomEditor()
- provide a custom editor by overriding InplaceEditor.Factory.getInplaceEditor()
- paint a Swing component used to render the property value when it isn't in edition by overriding PropertyEditor.paintValue()

In my case, I tried to add a JButton (to implement a kind of eye dropper like in The Gimp for example) at the left of the one that opens the custom editor by using ButtonPanel which is not in the public API.

Why not providing a mechanism similar to the one allowing to use a custom editor in order to allow the addition of any Swing component into the area dedicated to the display of the property value both during edition and when the value is just renderer?