01: package org.uispec4j;
02:
03: import org.uispec4j.assertion.Assertion;
04:
05: import java.awt.*;
06:
07: /**
08: * Interface for all UI (user interface) components.
09: */
10: public interface UIComponent {
11:
12: /**
13: * Returns the Java GUI component represented by this object.
14: */
15: Component getAwtComponent();
16:
17: /**
18: * Returns an XML representation of the component and its subcomponents.
19: */
20: String getDescription();
21:
22: /**
23: * Returns the name of the component as it will appear in the XML representation
24: * returned by {@link UIComponent#getDescription()}.
25: */
26: String getDescriptionTypeName();
27:
28: /**
29: * Checks if the component is enabled.
30: */
31: Assertion isEnabled();
32:
33: /**
34: * Returns the label displayed on this component, or null if this has no sense for this kind of components.
35: */
36: String getLabel();
37:
38: /**
39: * Returns the internal name with which can be used to identify the component. This can be null
40: * if no name was set by the developers.
41: */
42: String getName();
43: }
|