< prev index next >
src/java.desktop/share/classes/sun/swing/UIAction.java
Print this page
*** 28,38 ****
import javax.swing.Action;
/**
* UIAction is the basis of all of basic's action classes that are used in
! * an ActionMap. Subclasses need to override <code>actionPerformed</code>.
* <p>
* A typical subclass will look like:
* <pre>
* private static class Actions extends UIAction {
* Actions(String name) {
--- 28,38 ----
import javax.swing.Action;
/**
* UIAction is the basis of all of basic's action classes that are used in
! * an ActionMap. Subclasses need to override {@code actionPerformed}.
* <p>
* A typical subclass will look like:
* <pre>
* private static class Actions extends UIAction {
* Actions(String name) {
*** 49,60 ****
* }
* }
* </pre>
* <p>
* Subclasses that wish to conditionalize the enabled state should override
! * <code>isEnabled(Component)</code>, and be aware that the passed in
! * <code>Component</code> may be null.
*
* @see javax.swing.Action
* @author Scott Violet
*/
public abstract class UIAction implements Action {
--- 49,60 ----
* }
* }
* </pre>
* <p>
* Subclasses that wish to conditionalize the enabled state should override
! * {@code isEnabled(Component)}, and be aware that the passed in
! * {@code Component} may be null.
*
* @see javax.swing.Action
* @author Scott Violet
*/
public abstract class UIAction implements Action {
*** 82,100 ****
// UIAction is not mutable, this does nothing.
public void setEnabled(boolean b) {
}
/**
! * Cover method for <code>isEnabled(null)</code>.
*/
public final boolean isEnabled() {
return isEnabled(null);
}
/**
* Subclasses that need to conditionalize the enabled state should
! * override this. Be aware that <code>sender</code> may be null.
*
* @param sender Widget enabled state is being asked for, may be null.
*/
public boolean isEnabled(Object sender) {
return true;
--- 82,100 ----
// UIAction is not mutable, this does nothing.
public void setEnabled(boolean b) {
}
/**
! * Cover method for {@code isEnabled(null)}.
*/
public final boolean isEnabled() {
return isEnabled(null);
}
/**
* Subclasses that need to conditionalize the enabled state should
! * override this. Be aware that {@code sender} may be null.
*
* @param sender Widget enabled state is being asked for, may be null.
*/
public boolean isEnabled(Object sender) {
return true;
< prev index next >