% Script/Function Filename:uicontrol
%     leapYearGUI.m
% Purpose:
%     Enter the purpose of the function/file here
%
% Record of modifications:
%     Programmer(s): {Your Name}
%     Date Due: YYYY-MM-DD
%     Date Submitted: YYYY-MM-DD
%     References: ????
%     Help Received: ????
%
% Variables Used:
%     Enter the variables that you use here

year = randi( 2100 );
yearSpace = uicontrol( 'style' , 'text' , 'units' , 'normalized' , ...
    'fontunits' , 'normalized' , 'fontsize' , 0.25 , 'fontname' , 'fixedwidth' , ...
    'string' , sprintf( '%d' , year ) , 'position' , [ 0 0 1 1 ] );
if( isLeapYear( year ) )
    set( yearSpace , 'BackgroundColor' , [ 0 1 0 ] );
else
    set( yearSpace , 'BackgroundColor' , [ 1 0 0 ] );
end
yearSlider = uicontrol( 'style', 'slider' , 'units' , 'normalized' , ...
    'min' , 1 , 'max' , 2100 , 'value' , year , ...
    'position' , [ 0 0 1 0.05 ] , 'sliderstep' , [ 1 / 2100 4 / 2100 ] );
addlistener( yearSlider , 'ContinuousValueChange' , @ourYearListener );
set( 0 , 'UserData' , yearSpace );