Bug 29294 - Give more hints to user for value of property through property editor dialogs
Give more hints to user for value of property through property editor dialogs
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Property Editors
3.x
All All
: P3 (vote)
: 3.x
Assigned To: _ tboudreau
issues@platform
http://www.netbeans.org/download/dev/...
: API
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-04 18:12 UTC by Ann Sunhachawee
Modified: 2008-12-22 16:59 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Patch implementing the enhancement for String editors (10.55 KB, patch)
2003-03-03 16:07 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ann Sunhachawee 2002-12-04 18:12:54 UTC
To give users more of a hint at what type of value
should be typed into properties that have a text
entry (like the Name property of a Java class),
the property editor dialog should be more
flexible, instead of putting up the standard
"string property editor dialog" which shows a very
large textarea. This solution, though consistent
through the properties that have text entry, is
not elegant and may make users have to think that
much longer to figure out what kind of value is
expected.

Suggestions are
1) Provide API so module developer can specify
what the size of the text entry area (e.g. one
line vs text area)
2) Provide API so that module developer can
suppress the "..." from appearing in the property
sheet (since it may not be necessary for user to
have to open a whole other property editor to edit
a name of a java class, for example.
Comment 1 Marian Mirilovic 2002-12-06 17:09:24 UTC
reassigne to Tim, new owner of property editors.
Comment 2 Jesse Glick 2002-12-09 16:38:28 UTC
Note that such things are normally done using nonnormative hints set
on the property editor, which should be listed in the table in the
Explorer API.
Comment 3 _ tboudreau 2003-03-03 16:06:13 UTC
Attaching a patch which implements this enhancement.
Node.Property objects can return Boolean.TRUE from 
  getValue ("oneline") 
to hint to the property editor that it should use a JTextField,
not a JTextArea.

Node.Property objects can return Boolean.TRUE from
  getValue ("suppressCustomEditor")
to hint to the property editor that it should return false
from supportsCustomEditor().

The attached patch also allows a Node.Property to include
user-visible instructions by returning a String from
  getValue ("instructions")

Patch includes necessary docs modifications.  Let me know if
it is acceptable.
Comment 4 _ tboudreau 2003-03-03 16:07:24 UTC
Created attachment 9242 [details]
Patch implementing the enhancement for String editors
Comment 5 _ tboudreau 2003-03-03 16:09:52 UTC
Note you'll still need to figure out which specific strings in the
IDE should use the one-line editor and which should suppress the
custom editor altogether, and probably create tasks for developers
of those modules.  The default behavior is unchanged.
Comment 6 _ tboudreau 2003-03-26 17:33:53 UTC
Fixed in trunk, StringEditor.java 1.18 and StringCustomEditor.java 
1.24.  StringEditor now honors the following hints:

"oneline" - Boolean - if true, use a JTextField
"suppressCustomEditor" - don't show the custom editor button
"instructions" - provide text instructions to display above the
text field/area (also maps to accessible description)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo