home *** CD-ROM | disk | FTP | other *** search
- package javax.swing;
-
- import javax.accessibility.AccessibleAction;
- import javax.accessibility.AccessibleState;
- import javax.accessibility.AccessibleStateSet;
- import javax.accessibility.AccessibleValue;
-
- public abstract class AbstractButton$AccessibleAbstractButton extends JComponent.AccessibleJComponent implements AccessibleAction, AccessibleValue {
- // $FF: synthetic field
- private final AbstractButton this$0;
-
- protected AbstractButton$AccessibleAbstractButton(AbstractButton var1) {
- super(var1);
- this.this$0 = var1;
- }
-
- public boolean doAccessibleAction(int var1) {
- if (var1 == 0) {
- this.this$0.doClick();
- return true;
- } else {
- return false;
- }
- }
-
- public AccessibleAction getAccessibleAction() {
- return this;
- }
-
- public int getAccessibleActionCount() {
- return 1;
- }
-
- public String getAccessibleActionDescription(int var1) {
- return var1 == 0 ? new String("click") : null;
- }
-
- public String getAccessibleName() {
- if (super.accessibleName != null) {
- return super.accessibleName;
- } else {
- return this.this$0.getText() == null ? super.getAccessibleName() : this.this$0.getText();
- }
- }
-
- public AccessibleStateSet getAccessibleStateSet() {
- AccessibleStateSet var1 = super.getAccessibleStateSet();
- if (this.this$0.getModel().isArmed()) {
- var1.add(AccessibleState.ARMED);
- }
-
- if (this.this$0.hasFocus()) {
- var1.add(AccessibleState.FOCUSED);
- }
-
- if (this.this$0.getModel().isPressed()) {
- var1.add(AccessibleState.PRESSED);
- }
-
- if (this.this$0.isSelected()) {
- var1.add(AccessibleState.CHECKED);
- }
-
- return var1;
- }
-
- public AccessibleValue getAccessibleValue() {
- return this;
- }
-
- public Number getCurrentAccessibleValue() {
- return this.this$0.isSelected() ? new Integer(1) : new Integer(0);
- }
-
- public Number getMaximumAccessibleValue() {
- return new Integer(1);
- }
-
- public Number getMinimumAccessibleValue() {
- return new Integer(0);
- }
-
- public boolean setCurrentAccessibleValue(Number var1) {
- if (var1 instanceof Integer) {
- int var2 = var1.intValue();
- if (var2 == 0) {
- this.this$0.setSelected(false);
- } else {
- this.this$0.setSelected(true);
- }
-
- return true;
- } else {
- return false;
- }
- }
- }
-