Closed GoogleCodeExporter closed 9 years ago
great!
Original comment by mr0...@mro.name
on 28 Jul 2009 at 3:28
In some runs, I experimented with making the internal JLabel static (so all
PHTML
shared a copy), and didn't see any problems with the rendering. We should
discuss
whether a static JLabel would be better or worse.
Original comment by samrr...@gmail.com
on 28 Jul 2009 at 4:00
A few thoughts about the code in the phtml branch, as of r620.
The license text is not exactly correct, it should match the text in
license-piccolo.txt
I prefer the classname PHtmlText or PHTMLText to PHtml.
I prefer keeping the API in line with PText:
PROPERTY_HTML = "html"; --> PROPERTY_TEXT = "text";
PROPERTY_CODE_HTML --> PROPERTY_CODE_TEXT
PROPERTY_HTML_COLOR = "html color"; --> PROPERTY_TEXT_COLOR = "text color"
PROPERTY_CODE_HTML_COLOR --> PROPERTY_CODE_TEXT_COLOR
String getHtml() --> String getText()
void setHtml(final String newHtml) --> void setText(final String text)
Color getHtmlColor() --> Color getTextColor()
void setHtmlColor(final Color newColor) --> void setTextColor(final Color
textColor)
Is it possible to use setTextPaint(Paint paint) instead of Color?
Add a javadoc note to the setBounds methods
/**
* {@inheritDoc}
*
* <p>Subclasses that override this method must call
<code>super.setBounds(...)</code> for bounds changes to be processed
correctly.</p>
*/
DEFAULT_FONT and DEFAULT_HTML_COLOR (or DEFAULT_TEXT_COLOR or
DEFAULT_TEXT_PAINT as
it were) could be made package-private so that the unit test could check for
those
instead of just IsNotNullByDefault. Or PText has DEFAULT_FONT public.
Original comment by heue...@gmail.com
on 29 Jul 2009 at 8:53
On further consideration, I like PHtmlView or PHTMLView better as a class name.
It is not possible to use setTextPaint(Paint paint) because JLabel provides only
setForeground(Color). I like then void setTextColor(final Color textColor) and
similar.
The javadoc note about calling super.setBounds probably isn't necessary since
that
recommendation holds for nearly all protected methods in Piccolo2D.
Original comment by heue...@gmail.com
on 30 Jul 2009 at 3:06
merged branch in r642
Original comment by allain.lalonde
on 5 Aug 2009 at 12:55
Original comment by allain.lalonde
on 5 Aug 2009 at 12:51
Committed some of the changes I mentioned above for review in r658.
$ svn commit -m "Issue 111 ; API and javadoc improvements to PHtmlView, html -->
text, htmlColor --> textColor, clickedAddress --> linkAddressAt, etc."
Sending ...
Transmitting file data ...
Committed revision 658.
Original comment by heue...@gmail.com
on 6 Aug 2009 at 5:22
PHtmlView should also provide the paintGreek/greekThreshold mechanism as in
PText and
PSwing.
Original comment by heue...@gmail.com
on 6 Aug 2009 at 5:34
Why's that? Why is it in PText at all? PSwing maybe, but even there...?
Original comment by allain.lalonde
on 6 Aug 2009 at 5:50
I guess paintGreek/greekThreshold can wait, if deemed necessary. Marking as
Verified.
Original comment by heue...@gmail.com
on 30 Oct 2009 at 3:03
Original issue reported on code.google.com by
allain.lalonde
on 28 Jul 2009 at 3:22