-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaxesStringEntry.m
36 lines (31 loc) · 1015 Bytes
/
axesStringEntry.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
classdef axesStringEntry < customStringEntry
%AXESSTRINGENTRY Abstract Class for holding and manipulating axes string entries
properties (Dependent)
ParentPosition;
end
methods
function p = get.ParentPosition(l)
p = l.ax.Position;
end
function set.ParentPosition(l, p)
l.ax.Position = p;
end
end
methods (Access = 'protected')
function setVisible(l, s)
pos = l.getLabelPositions;
setVisible@customStringEntry(l, s)
l.setLabelPositions(pos)
end
function pos = getLabelPositions(l)
pos.Y = l.ax.YLabel.Position;
pos.X = l.ax.XLabel.Position;
pos.T = l.ax.Title.Position;
end
function setLabelPositions(l, pos)
l.ax.YLabel.Position = pos.Y;
l.ax.XLabel.Position = pos.X;
l.ax.Title.Position = pos.T;
end
end
end