No BSD License  

Highlights from
Yet Another Layout Manager

  • resize_example 1. This layout manager is based on MATLAB Central File Exchange entry "Resizable
  • RE_Axis custom axis
  • RE_Box elementary layout building block, positions matrix of elements
  • RE_Button checkboxes/radiobuttons/togglebuttons column
  • RE_Layout Class which defines figure and has many factory methods for ui components
  • RE_Panel custom axis
  • RE_Separator separator with or without label
  • RE_Tabpane tab pane implementation using java element
  • View all files
image thumbnail
from Yet Another Layout Manager by amilcar chaudhary
Easily align gui elements and quickly build resizable gui

RE_Axis
%% custom axis
classdef RE_Axis < RE_Box
    
    methods

        % CONSTRUCTOR
        function obj = RE_Axis(varargin)
            hui = axes('units', 'pixels', 'FontSize', 8);
            obj = obj@RE_Box(hui);
            set(obj, varargin{:});

            hcell = get(hui, {'Title', 'YLabel', 'XLabel'});
            set([hcell{:}], 'FontWeight', 'bold', 'FontSize', 8, 'Fontname', 'verdana');
        end
    end % methods

    methods (Access = protected)
        
        %% set elements position
        function setPosition(obj)

            pd = obj.Padding;
            ti = get(obj.Handle, 'tightinset');
            position = obj.Position(:) + ...
                [ti(1); ti(2); -ti(1)-ti(3); -ti(2)-ti(4)] + ...
                [pd(1); pd(2); -pd(1)-pd(3); -pd(2)-pd(4)];

            position([3,4]) = max(2, position([3,4]));

            set( obj.Handle, 'position', position );
        end
    end
end % classdef

Contact us at files@mathworks.com