Home » Eclipse Projects » GEF » Property descriptor: color on displayName and textCellEditor use
| Property descriptor: color on displayName and textCellEditor use [message #81934] |
Wed, 04 June 2003 07:09  |
Eclipse User |
|
|
|
Hi,
I'm pretty much into property descriptors now and I have two questions on
the subject.
1. Say that a property must be set, for instance a name on an editpart.
If the name
property isn't set I would like the property name string to turn
red. Is that possible?
2. I use the TextPropertyDescriptor quiet a lot, and mostly I popup a
text editor
instead of using the default TextCellEditor. Is it possible to have
it both ways?
What I'm trying to say is that, if the user only wants to write a
short name for
an editpart he or she shouldn't have to popup a text editor using
the "..." button,
instead it should be possible to edit directly in the property value
field.
I have seen and used applications with the features mentioned above and I'm
really
interested in knowing if it's possible here too.
Thanks,
/Stefan
|
|
|
| Re: Property descriptor: color on displayName and textCellEditor use [message #82034 is a reply to message #81934] |
Wed, 04 June 2003 10:52   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
This is a multi-part message in MIME format.
------=_NextPart_000_005B_01C32A87.6F158A20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This is a bug in the Logic editor. Here is the way to properly fix the =
"width" property in the class DimensionPropertySource.
static{
PropertyDescriptor widthProp =3D
new TextPropertyDescriptor(
ID_WIDTH,
LogicMessages.DimensionPropertySource_Property_Width_Label);
widthProp.setValidator(new ICellEditorValidator() {
public String isValid(Object value) {
try {
new Integer((String)value);
return null;
} catch (NumberFormatException exc) {
return "Not a number";
}
}
});
descriptors =3D
new IPropertyDescriptor[] {
widthProp,
new TextPropertyDescriptor(
ID_HEIGHT,
LogicMessages.DimensionPropertySource_Property_Height_Label) };
}
Once the property source is implemented correctly, you cannot get the =
dialogs you mention.
"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbkk26$m87$1@rogue.oti.com...
> Hi,
>=20
> I'm pretty much into property descriptors now and I have two questions =
on
> the subject.
> 1. Say that a property must be set, for instance a name on an =
editpart.
> If the name
> property isn't set I would like the property name string to =
turn
> red. Is that possible?
> 2. I use the TextPropertyDescriptor quiet a lot, and mostly I popup =
a
> text editor
> instead of using the default TextCellEditor. Is it possible to =
have
> it both ways?
> What I'm trying to say is that, if the user only wants to =
write a
> short name for
> an editpart he or she shouldn't have to popup a text editor =
using
> the "..." button,
> instead it should be possible to edit directly in the property =
value
> field.
>=20
> I have seen and used applications with the features mentioned above =
and I'm
> really
> interested in knowing if it's possible here too.
>=20
> Thanks,
>=20
> /Stefan
>=20
>=20
------=_NextPart_000_005B_01C32A87.6F158A20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2723.2500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial size=3D2>This =
is a bug in the=20
Logic editor. Here is the way to properly fix the "width" property =
in the=20
class DimensionPropertySource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>static{<BR> PropertyDescriptor=20
widthProp =3D<BR> new=20
TextPropertyDescriptor(<BR> ID_WIDTH, <BR> &nb=
sp;LogicMessages.DimensionPropertySource_Property_Width_Labe l); <BR> =
widthProp.setValidator(new=20
ICellEditorValidator() {<BR><STRONG> public String =
isValid(Object=20
value) {<BR> try {<BR> new=20
Integer((String)value);<BR> return=20
null;<BR> } catch (NumberFormatException exc)=20
{<BR> return "Not a=20
number";<BR> }<BR> } <BR></STRONG> });<BR=
> descriptors=20
=3D<BR> new IPropertyDescriptor[]=20
{<BR> widthProp,<BR> new=20
TextPropertyDescriptor(<BR> ID_HEIGHT, <BR> &n=
bsp; LogicMessages.DimensionPropertySourc e_Property_Height_Lab=
el)};<BR>}<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT><FONT face=3D"Courier =
New"=20
size=3D2><FONT face=3DArial></FONT> </DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Once the property source is implemented =
correctly,=20
you cannot get the dialogs you mention.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Stefan Junsved" <</FONT><A=20
href=3D"mailto:stefan.junsved@comactivity.net"><FONT face=3DArial=20
size=3D2>stefan.junsved@comactivity.net</FONT></A><FONT face=3DArial =
size=3D2>>=20
wrote in message </FONT><A =
href=3D"news:bbkk26$m87$1@rogue.oti.com"><FONT=20
face=3DArial size=3D2>news:bbkk26$m87$1@rogue.oti.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Hi,<BR>> =
<BR>> I'm=20
pretty much into property descriptors now and I have two questions =
on<BR>>=20
the subject.<BR>> 1. Say that a property must be =
set, for=20
instance a name on an editpart.<BR>> If the name<BR>>=20
property isn't set I would =
like the=20
property name string to turn<BR>> red. Is that possible?<BR>>=20
2. I use the TextPropertyDescriptor quiet a lot, and =
mostly I=20
popup a<BR>> text editor<BR>> =
=20
instead of using the default TextCellEditor. Is it possible to =
have<BR>> it=20
both ways?<BR>> What I'm =
trying to=20
say is that, if the user only wants to write a<BR>> short name =
for<BR>>=20
an editpart he or she =
shouldn't have=20
to popup a text editor using<BR>> the "..." button,<BR>>=20
instead it should be possible =
to edit=20
directly in the property value<BR>> field.<BR>> <BR>> I have =
seen and=20
used applications with the features mentioned above and I'm<BR>>=20
really<BR>> interested in knowing if it's possible here too.<BR>> =
<BR>>=20
Thanks,<BR>> <BR>> /Stefan<BR>> <BR>> </FONT></BODY></HTML>
------=_NextPart_000_005B_01C32A87.6F158A20--
|
|
|
| Re: Property descriptor: color on displayName and textCellEditor use [message #82199 is a reply to message #82034] |
Thu, 05 June 2003 06:03   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C32B5A.8935A0B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I don't think your answer corresponds to my original question...or?
/Stefan
"Randy Hudson" <none@us.ibm.com> wrote in message =
news:bbl13u$3m5$1@rogue.oti.com...
This is a bug in the Logic editor. Here is the way to properly fix =
the "width" property in the class DimensionPropertySource.
static{
PropertyDescriptor widthProp =3D
new TextPropertyDescriptor(
ID_WIDTH,
LogicMessages.DimensionPropertySource_Property_Width_Label);
widthProp.setValidator(new ICellEditorValidator() {
public String isValid(Object value) {
try {
new Integer((String)value);
return null;
} catch (NumberFormatException exc) {
return "Not a number";
}
}
});
descriptors =3D
new IPropertyDescriptor[] {
widthProp,
new TextPropertyDescriptor(
ID_HEIGHT,
LogicMessages.DimensionPropertySource_Property_Height_Label) };
}
Once the property source is implemented correctly, you cannot get the =
dialogs you mention.
"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbkk26$m87$1@rogue.oti.com...
> Hi,
>=20
> I'm pretty much into property descriptors now and I have two =
questions on
> the subject.
> 1. Say that a property must be set, for instance a name on an =
editpart.
> If the name
> property isn't set I would like the property name string to =
turn
> red. Is that possible?
> 2. I use the TextPropertyDescriptor quiet a lot, and mostly I =
popup a
> text editor
> instead of using the default TextCellEditor. Is it possible =
to have
> it both ways?
> What I'm trying to say is that, if the user only wants to =
write a
> short name for
> an editpart he or she shouldn't have to popup a text editor =
using
> the "..." button,
> instead it should be possible to edit directly in the =
property value
> field.
>=20
> I have seen and used applications with the features mentioned above =
and I'm
> really
> interested in knowing if it's possible here too.
>=20
> Thanks,
>=20
> /Stefan
>=20
>
------=_NextPart_000_0009_01C32B5A.8935A0B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I don't think your answer corresponds =
to my=20
original question...or?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>/Stefan</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Randy Hudson" <<A=20
href=3D"mailto:none@us.ibm.com">none@us.ibm.com</A>> wrote in =
message <A=20
=
href=3D"news:bbl13u$3m5$1@rogue.oti.com">news:bbl13u$3m5$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2>This is a bug in=20
the Logic editor. Here is the way to properly fix the "width" =
property=20
in the class DimensionPropertySource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>static{<BR> PropertyDescriptor=20
widthProp =3D<BR> new=20
=
TextPropertyDescriptor(<BR> ID_WIDTH, <BR> &nb=
sp;LogicMessages.DimensionPropertySource_Property_Width_Labe l); <BR> =
widthProp.setValidator(new=20
ICellEditorValidator() {<BR><STRONG> public String =
isValid(Object=20
value) {<BR> try {<BR> new=20
Integer((String)value);<BR> return=20
null;<BR> } catch (NumberFormatException exc)=20
{<BR> return "Not a=20
=
number";<BR> }<BR> } <BR></STRONG> });<BR=
> descriptors=20
=3D<BR> new IPropertyDescriptor[]=20
{<BR> widthProp,<BR> new=20
=
TextPropertyDescriptor(<BR> ID_HEIGHT, <BR> &n=
bsp; LogicMessages.DimensionPropertySourc e_Property_Height_Lab=
el)};<BR>}<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT><FONT face=3D"Courier =
New"=20
size=3D2><FONT face=3DArial></FONT> </DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Once the property source is =
implemented=20
correctly, you cannot get the dialogs you mention.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Stefan Junsved" <</FONT><A=20
href=3D"mailto:stefan.junsved@comactivity.net"><FONT face=3DArial=20
size=3D2>stefan.junsved@comactivity.net</FONT></A><FONT face=3DArial =
size=3D2>>=20
wrote in message </FONT><A =
href=3D"news:bbkk26$m87$1@rogue.oti.com"><FONT=20
face=3DArial size=3D2>news:bbkk26$m87$1@rogue.oti.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Hi,<BR>> =
<BR>> I'm=20
pretty much into property descriptors now and I have two questions =
on<BR>>=20
the subject.<BR>> 1. Say that a property must be =
set, for=20
instance a name on an editpart.<BR>> If the name<BR>>=20
property isn't set I would =
like the=20
property name string to turn<BR>> red. Is that possible?<BR>>=20
2. I use the TextPropertyDescriptor quiet a lot, and =
mostly=20
I popup a<BR>> text editor<BR>>=20
instead of using the =
default=20
TextCellEditor. Is it possible to have<BR>> it both ways?<BR>>=20
What I'm trying to say is =
that, if=20
the user only wants to write a<BR>> short name for<BR>>=20
an editpart he or she =
shouldn't=20
have to popup a text editor using<BR>> the "..." button,<BR>>=20
instead it should be =
possible to=20
edit directly in the property value<BR>> field.<BR>> <BR>> I =
have=20
seen and used applications with the features mentioned above and =
I'm<BR>>=20
really<BR>> interested in knowing if it's possible here =
too.<BR>>=20
<BR>> Thanks,<BR>> <BR>> /Stefan<BR>> <BR>>=20
</FONT></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0009_01C32B5A.8935A0B0--
|
|
| |
| Re: Property descriptor: color on displayName and textCellEditor use [message #82364 is a reply to message #82199] |
Thu, 05 June 2003 10:23  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
This is a multi-part message in MIME format.
------=_NextPart_000_00CB_01C32B4C.770A79F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
1. No, this cannot be done currently.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D4584
2. The closes thing is DialogCellEditor
"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbn4im$kne$1@rogue.oti.com...
I don't think your answer corresponds to my original question...or?
/Stefan
"Randy Hudson" <none@us.ibm.com> wrote in message =
news:bbl13u$3m5$1@rogue.oti.com...
This is a bug in the Logic editor. Here is the way to properly fix =
the "width" property in the class DimensionPropertySource.
static{
PropertyDescriptor widthProp =3D
new TextPropertyDescriptor(
ID_WIDTH,
LogicMessages.DimensionPropertySource_Property_Width_Label);
widthProp.setValidator(new ICellEditorValidator() {
public String isValid(Object value) {
try {
new Integer((String)value);
return null;
} catch (NumberFormatException exc) {
return "Not a number";
}
}
});
descriptors =3D
new IPropertyDescriptor[] {
widthProp,
new TextPropertyDescriptor(
ID_HEIGHT,
LogicMessages.DimensionPropertySource_Property_Height_Label) };
}
Once the property source is implemented correctly, you cannot get =
the dialogs you mention.
"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbkk26$m87$1@rogue.oti.com...
> Hi,
>=20
> I'm pretty much into property descriptors now and I have two =
questions on
> the subject.
> 1. Say that a property must be set, for instance a name on an =
editpart.
> If the name
> property isn't set I would like the property name string =
to turn
> red. Is that possible?
> 2. I use the TextPropertyDescriptor quiet a lot, and mostly I =
popup a
> text editor
> instead of using the default TextCellEditor. Is it =
possible to have
> it both ways?
> What I'm trying to say is that, if the user only wants to =
write a
> short name for
> an editpart he or she shouldn't have to popup a text =
editor using
> the "..." button,
> instead it should be possible to edit directly in the =
property value
> field.
>=20
> I have seen and used applications with the features mentioned =
above and I'm
> really
> interested in knowing if it's possible here too.
>=20
> Thanks,
>=20
> /Stefan
>=20
>=20
------=_NextPart_000_00CB_01C32B4C.770A79F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2723.2500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>1. No, this cannot be done =
currently.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D4584">https://bug=
s.eclipse.org/bugs/show_bug.cgi?id=3D4584</A></FONT></DIV >
<DIV><FONT face=3DArial size=3D2>2. The closes thing is=20
DialogCellEditor</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Stefan Junsved" <<A=20
=
href=3D"mailto:stefan.junsved@comactivity.net">stefan.junsved@comactivity=
..net</A>>=20
wrote in message <A=20
=
href=3D"news:bbn4im$kne$1@rogue.oti.com">news:bbn4im$kne$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I don't think your answer corresponds =
to my=20
original question...or?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>/Stefan</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Randy Hudson" <<A=20
href=3D"mailto:none@us.ibm.com">none@us.ibm.com</A>> wrote in =
message <A=20
=
href=3D"news:bbl13u$3m5$1@rogue.oti.com">news:bbl13u$3m5$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2>This is a bug in=20
the Logic editor. Here is the way to properly fix the "width" =
property=20
in the class DimensionPropertySource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>static{<BR> PropertyDescriptor=20
widthProp =3D<BR> new=20
=
TextPropertyDescriptor(<BR> ID_WIDTH, <BR> &nb=
sp;LogicMessages.DimensionPropertySource_Property_Width_Labe l); <BR> =
widthProp.setValidator(new=20
ICellEditorValidator() {<BR><STRONG> public String =
isValid(Object=20
value) {<BR> try {<BR> new=20
Integer((String)value);<BR> return=20
null;<BR> } catch (NumberFormatException exc)=20
{<BR> return "Not a=20
=
number";<BR> }<BR> } <BR></STRONG> });<BR=
> descriptors=20
=3D<BR> new IPropertyDescriptor[]=20
{<BR> widthProp,<BR> new=20
=
TextPropertyDescriptor(<BR> ID_HEIGHT, <BR> &n=
bsp; LogicMessages.DimensionPropertySourc e_Property_Height_Lab=
el)};<BR>}<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT><FONT =
face=3D"Courier New"=20
size=3D2><FONT face=3DArial></FONT> </DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Once the property source is =
implemented=20
correctly, you cannot get the dialogs you mention.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Stefan Junsved" <</FONT><A=20
href=3D"mailto:stefan.junsved@comactivity.net"><FONT face=3DArial=20
size=3D2>stefan.junsved@comactivity.net</FONT></A><FONT face=3DArial =
size=3D2>>=20
wrote in message </FONT><A =
href=3D"news:bbkk26$m87$1@rogue.oti.com"><FONT=20
face=3DArial =
size=3D2>news:bbkk26$m87$1@rogue.oti.com</FONT></A><FONT face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> =
Hi,<BR>> <BR>> I'm=20
pretty much into property descriptors now and I have two questions=20
on<BR>> the subject.<BR>> 1. Say that a =
property=20
must be set, for instance a name on an editpart.<BR>> If the =
name<BR>>=20
property isn't set I =
would like=20
the property name string to turn<BR>> red. Is that =
possible?<BR>>=20
2. I use the TextPropertyDescriptor quiet a lot, =
and=20
mostly I popup a<BR>> text editor<BR>>=20
instead of using the =
default=20
TextCellEditor. Is it possible to have<BR>> it both ways?<BR>> =
What I'm trying to say is =
that,=20
if the user only wants to write a<BR>> short name for<BR>>=20
an editpart he or she =
shouldn't=20
have to popup a text editor using<BR>> the "..." button,<BR>>=20
instead it should be =
possible to=20
edit directly in the property value<BR>> field.<BR>> <BR>> =
I have=20
seen and used applications with the features mentioned above and =
I'm<BR>>=20
really<BR>> interested in knowing if it's possible here =
too.<BR>>=20
<BR>> Thanks,<BR>> <BR>> /Stefan<BR>> <BR>>=20
</FONT></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_00CB_01C32B4C.770A79F0--
|
|
|
Goto Forum:
Current Time: Sun Nov 09 21:19:32 EST 2025
Powered by FUDForum. Page generated in 0.04787 seconds
|