-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDFDL_copyright.m
37 lines (31 loc) · 1.27 KB
/
DFDL_copyright.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function DFDL_copyright(~, ~)
%# read text file lines as cell array of strings
fid = fopen('README first.txt');
str = textscan(fid, '%s', 'Delimiter','\n'); str = str{1};
fclose(fid);
hFig = figure('Visible', 'on', 'Position', [1400, 50, 750, 900]);
hPan = uipanel(hFig, ...
'Title' ,'', ...
'Units' ,'normalized', ...
'Position',[0.05 0.05 0.9 0.9]);
hEdit = uicontrol(hPan, ...
'Style' ,'edit', ...
'FontSize' ,9, ...
'Min' ,0, ...
'Max' ,2, ...
'HorizontalAlignment','left', ...
'FontSize' , 12, ...
'Units' ,'normalized', ...
'Position' ,[0 0 1 1], ...
'String' ,str);
%# enable horizontal scrolling
jEdit = findjobj(hEdit);
jEditbox = jEdit.getViewport().getComponent(0);
jEditbox.setWrapping(false); %# turn off word-wrapping
jEditbox.setEditable(false); %# non-editable
set(jEdit,'HorizontalScrollBarPolicy',30); %# HORIZONTAL_SCROLLBAR_AS_NEEDED
%# maintain horizontal scrollbar policy which reverts back on component resize
hjEdit = handle(jEdit,'CallbackProperties');
set(hjEdit, 'ComponentResizedCallback',...
'set(gcbo,''HorizontalScrollBarPolicy'',30)');
end