73 */
74 @Override
75 public String toString() {
76
77 StringBuilder sb = new StringBuilder();
78 for (int i = 0; i < controls.length; i++) {
79 if (i != 0) {
80 sb.append(", ");
81 if ((i + 1) == controls.length) {
82 sb.append("and ");
83 }
84 }
85 sb.append(controls[i].getType());
86 }
87
88 return new String(getType() + " Control containing " + sb + " Controls.");
89 }
90
91 /**
92 * An instance of the {@code CompoundControl.Type} inner class identifies
93 * one kind of compound control. Static instances are provided for the
94 * common types.
95 *
96 * @author Kara Kytle
97 * @since 1.3
98 */
99 public static class Type extends Control.Type {
100
101 /**
102 * Constructs a new compound control type.
103 *
104 * @param name the name of the new compound control type
105 */
106 protected Type(final String name) {
107 super(name);
108 }
109 }
110 }
|
73 */
74 @Override
75 public String toString() {
76
77 StringBuilder sb = new StringBuilder();
78 for (int i = 0; i < controls.length; i++) {
79 if (i != 0) {
80 sb.append(", ");
81 if ((i + 1) == controls.length) {
82 sb.append("and ");
83 }
84 }
85 sb.append(controls[i].getType());
86 }
87
88 return new String(getType() + " Control containing " + sb + " Controls.");
89 }
90
91 /**
92 * An instance of the {@code CompoundControl.Type} inner class identifies
93 * one kind of compound control.
94 *
95 * @author Kara Kytle
96 * @since 1.3
97 */
98 public static class Type extends Control.Type {
99
100 /**
101 * Constructs a new compound control type.
102 *
103 * @param name the name of the new compound control type
104 */
105 protected Type(final String name) {
106 super(name);
107 }
108 }
109 }
|