Permalink
Browse files

PIVOT-883: Improve Javadoc for the ComponentStateListener interface,

particularly the "focusedChanged" method so the parameters are more
clearly explained.

But, also added more explanation to both methods of this interface,
including all the parameters.


git-svn-id: https://svn.apache.org/repos/asf/pivot/trunk@1417081 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 57bc1ec commit d5079f6efd503461558871fda195b28f073576a4 Roger Lee Whitcomb committed Dec 4, 2012
Showing with 14 additions and 3 deletions.
  1. +14 −3 wtk/src/org/apache/pivot/wtk/ComponentStateListener.java
@@ -37,16 +37,27 @@ public void focusedChanged(Component component, Component obverseComponent) {
/**
* Called when a component's enabled state has changed.
+ * <p> Called both when the component is enabled and when it is disabled.
+ * The component's <code>enabled</code> flag has already been set when this
+ * method is called so the new state can be determined by calling the
+ * {@link Component#isEnabled} method.
*
- * @param component
+ * @param component The component whose enabled state is changing.
*/
public void enabledChanged(Component component);
/**
* Called when a component's focused state has changed.
+ * <p> This will be called both when a component gains focus and when it loses
+ * focus. The currently focused component has already been set when this method
+ * is called, so that the new state of the component can be determined by calling
+ * the {@link Component#isFocused} method.
*
- * @param component
- * @param obverseComponent
+ * @param component The component that is either gaining focus or the one that
+ * previously had focus and is now losing it.
+ * @param obverseComponent If the component is gaining focus, this is the component
+ * that is losing focus. If the component is losing focus
+ * this is the component that is gaining the focus instead.
*/
public void focusedChanged(Component component, Component obverseComponent);
}

0 comments on commit d5079f6

Please sign in to comment.