[
https://issues.apache.org/jira/browse/PIVOT-1020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308565#comment-16308565
]
Roger Whitcomb commented on PIVOT-1020:
---------------------------------------
First batch of commits to implement this idea:
Sending core\src\org\apache\pivot\collections\Dictionary.java
Sending demos\src\org\apache\pivot\demos\rss\RSSItemRenderer.java
Sending
tutorials\src\org\apache\pivot\tutorials\webqueries\ResultItemRenderer.java
Sending wtk\src\org\apache\pivot\wtk\Component.java
Adding wtk\src\org\apache\pivot\wtk\Style.java
Sending wtk\src\org\apache\pivot\wtk\content\ButtonDataRenderer.java
Sending wtk\src\org\apache\pivot\wtk\content\TreeViewNodeRenderer.java
Transmitting file data .......done
Committing transaction...
Committed revision 1819872.
> Introduce a "Style" enum for compile-time checking of style names
> -----------------------------------------------------------------
>
> Key: PIVOT-1020
> URL: https://issues.apache.org/jira/browse/PIVOT-1020
> Project: Pivot
> Issue Type: Improvement
> Components: wtk
> Reporter: Roger Whitcomb
> Assignee: Roger Whitcomb
> Priority: Minor
> Fix For: 2.1
>
>
> Many places use hard-coded strings for component style names, and a number of
> which are fairly common ("font", "color", "horizontalAlignment"). It would
> reduce the possibility of misspelling of these style names if there were an
> enum for them so that the Java compiler would check spelling instead of
> finding out at runtime that the style name was misspelled.
> This would involve adding methods to Component.StyleDictionary to deal with
> the enum as a key.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)