[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: Migrating show/hide code to setVisible
From: Philip Race <philip.race () oracle ! com>
Date: 2022-07-29 16:45:13
Message-ID: 89064c0e-a16f-b273-d1bd-f60a97a25cfd () oracle ! com
[Download RAW message or body]
I'm not sure it would necessarily break things but it is churn (today
setVisible(boolean) actually calls show(boolean)! )
that doesn't help anything that I can see. We'd still have show() and
hide() .. so what would it solve ?
FWIW I never really liked that show() and hide() were deprecated.
There nothing wrong with them, but folks were being encouraged
to adopt the Java Beans component model practices so were directed to
setFoo() and getFoo()
I'd almost consider UN-deprecating them .. but it isn't a priority ..
.. and JavaFX uses show() and hide()
https://openjfx.io/javadoc/17/javafx.graphics/javafx/stage/Window.html#show()
-phil.
On 7/29/22 8:15 AM, Andy Goryachev wrote:
>
> I am afraid that this change will instantly break >80% of all deployed
> applications. Same for setSize()/resize().
>
> -andy
>
> *From: *client-libs-dev <client-libs-dev-retn@openjdk.org> on behalf
> of SWinxy <swinxythecat@gmail.com>
> *Date: *Thursday, 2022/07/28 at 23:25
> *To: *client-libs-dev@openjdk.org <client-libs-dev@openjdk.org>
> *Subject: *Migrating show/hide code to setVisible
>
> The show() and hide() methods of java.awt.Component have been
> deprecated for a long time now (JDK 1.1, 25 years ago), and a
> substantial bit of code is duplicated between them—rather
> unnecessarily. I think that their code should be merged into the
> preferred setVisible(boolean) method. The deprecated show(), hide(),
> and show(boolean) would call setVisible(boolean) with the
> corresponding value. They won't be deprecated for removal.
>
> From what I can tell, a migration can be done pretty easily. The
> headache I imagine can result is with mixing inheritances/overrides.
> Thoughts?
>
> -SWinxy
>
[Attachment #3 (text/html)]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
I'm not sure it would necessarily break things but it is churn
(today setVisible(boolean) actually calls show(boolean)! )<br>
that doesn't help anything that I can see. We'd still have show()
and hide() .. so what would it solve ?<br>
<br>
FWIW I never really liked that show() and hide() were deprecated.<br>
There nothing wrong with them, but folks were being encouraged<br>
to adopt the Java Beans component model practices so were directed
to setFoo() and getFoo()<br>
<br>
I'd almost consider UN-deprecating them .. but it isn't a priority
..<br>
.. and JavaFX uses show() and hide()<br>
<br>
<a class="moz-txt-link-freetext" \
href="https://openjfx.io/javadoc/17/javafx.graphics/javafx/stage/Window.html#show()">h \
ttps://openjfx.io/javadoc/17/javafx.graphics/javafx/stage/Window.html#show()</a><br> \
<br>
-phil.<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 7/29/22 8:15 AM, Andy Goryachev
wrote:<br>
</div>
<blockquote type="cite" \
cite="mid:BL0PR10MB2948825F5AF240336AD9862DE5999@BL0PR10MB2948.namprd10.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Courier New",serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
New",serif">I am afraid that this change will instantly
break >80% of all deployed applications. Same for
setSize()/resize().<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
New",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
New",serif">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
New",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
New",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
New",serif"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span \
style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">client-libs-dev
<a class="moz-txt-link-rfc2396E" \
href="mailto:client-libs-dev-retn@openjdk.org"><client-libs-dev-retn@openjdk.org></a> \
on behalf of
SWinxy <a class="moz-txt-link-rfc2396E" \
href="mailto:swinxythecat@gmail.com"><swinxythecat@gmail.com></a><br> <b>Date: \
</b>Thursday, 2022/07/28 at 23:25<br>
<b>To: </b><a class="moz-txt-link-abbreviated" \
href="mailto:client-libs-dev@openjdk.org">client-libs-dev@openjdk.org</a>
<a class="moz-txt-link-rfc2396E" \
href="mailto:client-libs-dev@openjdk.org"><client-libs-dev@openjdk.org></a><br>
<b>Subject: </b>Migrating show/hide code to \
setVisible<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">The show()
and hide() methods of java.awt.Component have been
deprecated for a long time now (JDK 1.1, 25 years ago),
and a substantial bit of code is duplicated between
themârather unnecessarily. I think that their code should
be merged into the preferred setVisible(boolean) method.
The deprecated show(), hide(), and show(boolean) would
call setVisible(boolean) with the corresponding value.
They won't be deprecated for removal.<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span \
style="font-size:11.0pt"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">From
what I can tell, a migration can be done
pretty easily. The headache I imagine can result is
with mixing inheritances/overrides. Thoughts?<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span \
style="font-size:11.0pt"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal"><span \
style="font-size:11.0pt">-SWinxy<o:p></o:p></span></p> </div>
</div>
</div>
</blockquote>
<br>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic