/**
  * Get the state of this object.
  *
  * @return an instance of AccessibleState containing the current state of the object
  * @see AccessibleState
  */
 public AccessibleStateSet getAccessibleStateSet() {
   AccessibleStateSet states = super.getAccessibleStateSet();
   if (((java.awt.List) source).isMultipleMode()) {
     states.add(AccessibleState.MULTISELECTABLE);
   }
   if (((java.awt.List) source).getSelectedItems().length > 0) {
     states.add(AccessibleState.SELECTED);
   }
   return states;
 }
Exemple #2
0
 /**
  * Get the state set of this object.
  *
  * @return an instance of AccessibleState containing the current state of the object
  * @see AccessibleState
  */
 public AccessibleStateSet getAccessibleStateSet() {
   AccessibleStateSet states = super.getAccessibleStateSet();
   if (getValueIsAdjusting()) {
     states.add(AccessibleState.BUSY);
   }
   if (getOrientation() == VERTICAL) {
     states.add(AccessibleState.VERTICAL);
   } else {
     states.add(AccessibleState.HORIZONTAL);
   }
   return states;
 }