Lines Matching defs:states

54     protected Vector<AccessibleState> states = null;
60 states = null;
64 * Creates a new state with the initial set of states contained in
65 * the array of states passed in. Duplicate entries are ignored.
67 * @param states an array of AccessibleState describing the state set.
69 public AccessibleStateSet(AccessibleState[] states) {
70 if (states.length != 0) {
71 this.states = new Vector(states.length);
72 for (int i = 0; i < states.length; i++) {
73 if (!this.states.contains(states[i])) {
74 this.states.addElement(states[i]);
92 // to always use a vector of states. It could be improved by
93 // caching the states as a bit set.]]]
94 if (states == null) {
95 states = new Vector();
98 if (!states.contains(state)) {
99 states.addElement(state);
107 * Adds all of the states to the existing state set. Duplicate entries
109 * @param states AccessibleState array describing the state set.
111 public void addAll(AccessibleState[] states) {
112 if (states.length != 0) {
113 if (this.states == null) {
114 this.states = new Vector(states.length);
116 for (int i = 0; i < states.length; i++) {
117 if (!this.states.contains(states[i])) {
118 this.states.addElement(states[i]);
135 if (states == null) {
138 return states.removeElement(state);
143 * Removes all the states from the current state set.
146 if (states != null) {
147 states.removeAllElements();
157 if (states == null) {
160 return states.contains(state);
169 if (states == null) {
172 AccessibleState[] stateArray = new AccessibleState[states.size()];
174 stateArray[i] = (AccessibleState) states.elementAt(i);
181 * Creates a localized String representing all the states in the set
189 if ((states != null) && (states.size() > 0)) {
190 ret = ((AccessibleState) (states.elementAt(0))).toDisplayString();
191 for (int i = 1; i < states.size(); i++) {
193 + ((AccessibleState) (states.elementAt(i))).