Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.4
Description
The existing protected attributes methods in Component don't allow custom components (those outside of the WTK package) to leverage attributes, because "A protected member or constructor of an object may be accessed from outside the package in which it is declared only by code that is responsible for the implementation of that object." [1]
This ticket proposes to change the attributes methods to the following signatures:
public <T extends Enum<T>> Object getAttribute(T key);
public <T extends Enum<T>> Object setAttribute(T key, Object value);
Containers will define their own attribute enum values to implement their static attribute-based methods.
[1] http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6.2