Home » Eclipse Projects » GEF » Dynamically resizing label
Dynamically resizing label [message #158720] |
Fri, 19 November 2004 14:37 |
Eclipse User |
|
|
|
Originally posted by: pavan.podila.gmail.com
Hi,
I am trying to use inline-editing for a label, similar to the
LogicLabelEditPart of the logic example. One problem I am facing is when
I type in text, the cell editor is not resizing dynamically. I have
looked at the logic code and it's not doing anything special for
resizing the celleditor. Can someone point out what's going wrong here.
Also when I press enter, the label is not resizing itself based on the
new text entered.
Looking forward,
Pavan
|
|
|
Re: Dynamically resizing label [message #158790 is a reply to message #158720] |
Fri, 19 November 2004 17:57 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Pavan Podila" <pavan.podila@gmail.com> wrote in message
news:cnl0et$nm2$1@www.eclipse.org...
> Hi,
> I am trying to use inline-editing for a label, similar to the
> LogicLabelEditPart of the logic example. One problem I am facing is when
> I type in text, the cell editor is not resizing dynamically. I have
Are you showing direct edit feedback? The logic editor does this.
> looked at the logic code and it's not doing anything special for
> resizing the celleditor. Can someone point out what's going wrong here.
> Also when I press enter, the label is not resizing itself based on the
> new text entered.
Does it get the new text?
It sounds like your width is set to a specific size instead of -1.
>
>
> Looking forward,
> Pavan
|
|
|
Re: Dynamically resizing label [message #158868 is a reply to message #158790] |
Fri, 19 November 2004 19:18 |
Eclipse User |
|
|
|
Originally posted by: pavan.podila.gmail.com
This is a multi-part message in MIME format.
--------------080107080307000300050002
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi Randy,
Can you point me to the code where the LogicLabel shows the
direct-edit feedback. You are right when you said that a specific width
is being set. I tried giving -1 to the width/height of my figure, but
was not having any effect. I am pasting the code that constructs my
figure. How do I set my width/height to -1 to get the automatic resizing
effect.
private void construct()
{
FlowPage flowPage = new FlowPage();
flowPage.setHorizontalAligment(PositionConstants.CENTER);
textFlow = new TextFlow();
textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,
ParagraphTextLayout.WORD_WRAP_SOFT));
flowPage.add(textFlow);
flowPage.setConstraint(textFlow, new Rectangle(-1, -1, 5, 5));
setLayoutManager(new FlowLayout());
add(flowPage);
setOpaque(true);
setBorder(new LineBorder());
}
Do get back soon.
Randy Hudson wrote:
>"Pavan Podila" <pavan.podila@gmail.com> wrote in message
>news:cnl0et$nm2$1@www.eclipse.org...
>
>
>>Hi,
>> I am trying to use inline-editing for a label, similar to the
>>LogicLabelEditPart of the logic example. One problem I am facing is when
>>I type in text, the cell editor is not resizing dynamically. I have
>>
>>
>
>Are you showing direct edit feedback? The logic editor does this.
>
>
>
>>looked at the logic code and it's not doing anything special for
>>resizing the celleditor. Can someone point out what's going wrong here.
>>Also when I press enter, the label is not resizing itself based on the
>>new text entered.
>>
>>
>
>Does it get the new text?
>
>It sounds like your width is set to a specific size instead of -1.
>
>
>
>>Looking forward,
>>Pavan
>>
>>
>
>
>
>
--------------080107080307000300050002
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi Randy,<br>
Can you point me to the code where the LogicLabel shows the
direct-edit feedback. You are right when you said that a specific width
is being set. I tried giving -1 to the width/height of my figure, but
was not having any effect. I am pasting the code that constructs my
figure. How do I set my width/height to -1 to get the automatic
resizing effect.<br>
<br>
private void construct()<br>
{<br>
FlowPage flowPage = new FlowPage();<br>
flowPage.setHorizontalAligment(PositionConstants.CENTER);<br >
textFlow = new TextFlow();<br>
textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,<br>
ParagraphTextLayout.WORD_WRAP_SOFT));<br>
flowPage.add(textFlow);<br>
flowPage.setConstraint(textFlow, new Rectangle(-1, -1, 5, 5));<br>
<br>
setLayoutManager(new FlowLayout());<br>
add(flowPage);<br>
setOpaque(true);<br>
setBorder(new LineBorder());<br>
}<br>
<br>
Do get back soon.<br>
<br>
</tt><br>
Randy Hudson wrote:
<blockquote cite="midcnlc6i$htn$1@www.eclipse.org" type="cite">
<pre wrap="">"Pavan Podila" <a class="moz-txt-link-rfc2396E" href="mailto:pavan.podila@gmail.com"><pavan.podila@gmail.com></a> wrote in message
<a class="moz-txt-link-freetext" href="news:cnl0et$nm2$1@www.eclipse.org">news:cnl0et$nm2$1@www.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I am trying to use inline-editing for a label, similar to the
LogicLabelEditPart of the logic example. One problem I am facing is when
I type in text, the cell editor is not resizing dynamically. I have
</pre>
</blockquote>
<pre wrap=""><!---->
Are you showing direct edit feedback? The logic editor does this.
</pre>
<blockquote type="cite">
<pre wrap="">looked at the logic code and it's not doing anything special for
resizing the celleditor. Can someone point out what's going wrong here.
Also when I press enter, the label is not resizing itself based on the
new text entered.
</pre>
</blockquote>
<pre wrap=""><!---->
Does it get the new text?
It sounds like your width is set to a specific size instead of -1.
</pre>
<blockquote type="cite">
<pre wrap="">
Looking forward,
Pavan
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>
--------------080107080307000300050002--
|
|
|
Re: Dynamically resizing label [message #159246 is a reply to message #158868] |
Tue, 23 November 2004 16:37 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
This is a multi-part message in MIME format.
------=_NextPart_000_017D_01C4D150.D1A46FA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
See DirectEditPolicy and subclasses
"Pavan Podila" <pavan.podila@gmail.com> wrote in message =
news:419E470C.2010705@gmail.com...
Hi Randy,
Can you point me to the code where the LogicLabel shows the =
direct-edit feedback. You are right when you said that a specific width =
is being set. I tried giving -1 to the width/height of my figure, but =
was not having any effect. I am pasting the code that constructs my =
figure. How do I set my width/height to -1 to get the automatic resizing =
effect.
private void construct()
{
FlowPage flowPage =3D new FlowPage();
flowPage.setHorizontalAligment(PositionConstants.CENTER);
textFlow =3D new TextFlow();
textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,
ParagraphTextLayout.WORD_WRAP_SOFT));
flowPage.add(textFlow);
flowPage.setConstraint(textFlow, new Rectangle(-1, -1, 5, 5));
setLayoutManager(new FlowLayout());
add(flowPage);
setOpaque(true);
setBorder(new LineBorder());
}
Do get back soon.
Randy Hudson wrote:=20
"Pavan Podila" <pavan.podila@gmail.com> wrote in message
news:cnl0et$nm2$1@www.eclipse.org...
Hi,
I am trying to use inline-editing for a label, similar to the
LogicLabelEditPart of the logic example. One problem I am facing is when
I type in text, the cell editor is not resizing dynamically. I have
=20
Are you showing direct edit feedback? The logic editor does this.
looked at the logic code and it's not doing anything special for
resizing the celleditor. Can someone point out what's going wrong here.
Also when I press enter, the label is not resizing itself based on the
new text entered.
=20
Does it get the new text?
It sounds like your width is set to a specific size instead of -1.
Looking forward,
Pavan
=20
------=_NextPart_000_017D_01C4D150.D1A46FA0
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=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>See DirectEditPolicy and =
subclasses</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>"Pavan Podila" <<A=20
href=3D"mailto:pavan.podila@gmail.com">pavan.podila@gmail.com</A>> =
wrote in=20
message <A=20
=
href=3D"news:419E470C.2010705@gmail.com">news:419E470C.2010705@gmail.com<=
/A>...</DIV><TT>Hi=20
Randy,<BR> Can you point me to the code where the =
LogicLabel=20
shows the direct-edit feedback. You are right when you said that a =
specific=20
width is being set. I tried giving -1 to the width/height of my =
figure, but=20
was not having any effect. I am pasting the code that constructs my =
figure.=20
How do I set my width/height to -1 to get the automatic resizing=20
effect.<BR><BR> private void=20
construct()<BR> {<BR> =
=20
FlowPage flowPage =3D new FlowPage();<BR> =
=20
=
flowPage.setHorizontalAligment(PositionConstants.CENTER);<BR > =
=20
textFlow =3D new TextFlow();<BR> =20
textFlow.setLayoutManager(new=20
ParagraphTextLayout(textFlow,<BR> =
=20
ParagraphTextLayout.WORD_WRAP_SOFT));<BR> =
=20
flowPage.add(textFlow);<BR> =20
flowPage.setConstraint(textFlow, new Rectangle(-1, -1, 5,=20
5));<BR><BR> setLayoutManager(new =
FlowLayout());<BR> =20
add(flowPage);<BR> =20
setOpaque(true);<BR> =
setBorder(new=20
LineBorder());<BR> }<BR><BR>Do get back=20
soon.<BR><BR></TT><BR>Randy Hudson wrote:=20
<BLOCKQUOTE cite=3Dmidcnlc6i$htn$1@www.eclipse.org type=3D"cite"><PRE =
wrap=3D"">"Pavan Podila" <A class=3Dmoz-txt-link-rfc2396E =
href=3D"mailto:pavan.podila@gmail.com"><pavan.podila@gmail.com></A>=
wrote in message
<A class=3Dmoz-txt-link-freetext =
href=3D"news:cnl0et$nm2$1@www.eclipse.org">news:cnl0et$nm2$1@www.eclipse.=
org</A>...
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Hi,
I am trying to use inline-editing for a label, similar to the
LogicLabelEditPart of the logic example. One problem I am facing is when
I type in text, the cell editor is not resizing dynamically. I have
</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->
Are you showing direct edit feedback? The logic editor does this.
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">looked at the logic code =
and it's not doing anything special for
resizing the celleditor. Can someone point out what's going wrong here.
Also when I press enter, the label is not resizing itself based on the
new text entered.
</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->
Does it get the new text?
It sounds like your width is set to a specific size instead of -1.
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Looking forward,
Pavan
</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->
</PRE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_017D_01C4D150.D1A46FA0--
|
|
|
Goto Forum:
Current Time: Thu Mar 28 21:40:00 GMT 2024
Powered by FUDForum. Page generated in 0.02427 seconds
|