Comment #3 on issue 111 by heuermh: Piccolo is missing HTML support
http://code.google.com/p/piccolo2d/issues/detail?id=111

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.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to