gets in GUIs. Widgets have label names that repre-
sent the names of input and output items. That is, la-
bel names indicate instruction of input from end users
and output to end users.
For some types of widgets, such as button and
menu item widgets, label names are put on them.
However, there are types of widgets on which label
names are not put, such as text field, list box, and
combo box widgets. For these widgets, label wid-
gets are associated with these widgets, and the label
names of the label widgets are used as the label names
of these widgets.
In addition, although for other types of widgets,
such as radio button and check box widgets, label
names are put on, the label names indicate selections,
not instructions. For example, for an event “A clerk
selects customer type” in a scenario, the input item is
“customer type”. When this item is realized as radio
buttons, the label names of the ratio button widgets
are not “customer type”, but selections, such as “reg-
ular” and “senior”. In this case, a label widget is asso-
ciated with these radio button widgets, and the label
name of this label widget is used as the label name of
the ratio button widgets.
In this paper, label widgets used to indicate in-
structions another widgets are called ”instruction la-
bels”, and widgets that instructions indicate by in-
struction labels are called ”target widgets”.
5.2.2 Positional Relationship between
Instruction Labels and Target Widgets
In many cases, instruction labels are located at imme-
diately left or upper to the target widgets. Humans
read text from left to right, and from upper to lower.
The above positional relationships between instruc-
tion labels and target widgets are natural, considering
the flow that end users read label names of instruc-
tion labels and look at the target widgets. The posi-
tional relationships are defined in many User Interface
Guidelines (UI guidelines), such as (Microsoft, ) and
(Inc., ).
Numbers of combinations of instruction labels and
target widgets were surveyed in the reference (Shi-
rogane and Fukazawa, 2008), the positions that the
most instruction labels were located were analyzed as
follows. In this method, instruction labels are identi-
fied based on this analysis.
Text field widgets: Left
Combo box widgets: Left
Radio button widgets: Left
Check box widgets: Left
List box widgets: Upper
5.2.3 Identification of Instruction Labels
To identify instruction labels, distances between in-
struction labels and target widgets are calculated us-
ing coordinates and size of widgets. The definitions
of distances and coordinates are as follows:
d
left
: Distance between the upper right corner of la-
bel widget and the upper left corner of target wid-
get
d
upper
: Distance between the lower left corner of la-
bel widget and the upper left corner of target wid-
get
(label
x1
, label
y1
): Coordinate of the upper corner of
label widget (Recorded in operation histories)
(label
x2
, label
y2
): Coordinate of the lower corner of
label widget (Calculated by adding width to x-
coordinate and height to y-coordinate of the upper
corner)
(widget
x1
, widget
y1
): Coordinate of the upper left
corner of target widget (Recorded in operation
histories)
(widget
x2
, widget
y2
): Coordinate of the lower right
corner of target widget (Calculated by adding
width to x-coordinate and height to y-coordinate
of the upper corner)
Figure 3 shows these definitions.
Label widget
Target widget
d
upper
Label widget Target widget
d
le
(label_x1, label_y1)
(label_x2, label_y2)
(wid_x1, wid_y1)
(wid_x2, wid_y2)
Figure 3: Definitions of distances and coordinates.
Values of d
left
and d
upper
are calculated by the for-
mula (1) and (2) (Shirogane and Fukazawa, 2008).
Values of d
left
are calculated for target widgets of text
field, combo box , radio button, and check box wid-
gets. Values of d
upper
are calculated for target wid-
gets of list box widgets. Values of d
left
and d
upper
are
calculated for all combinations between label widgets
and target widgets.
d
le ft
=
q
(lab x2− wid x1)
2
+ (lab y1− wid y1)
2
(1)
d
upper
=
q
(lab x1− wid x1)
2
+ (lab y2− wid y1)
2
(2)
ICSOFT-EA2014-9thInternationalConferenceonSoftwareEngineeringandApplications
410