Code covered by the BSD License  

Highlights from
Manage and Dock Figures into Group

5.0

5.0 | 2 ratings Rate this file 22 Downloads (last 30 days) File Size: 3.51 KB File ID: #18106
image thumbnail

Manage and Dock Figures into Group

by Anh Huy Phan

 

23 Dec 2007 (Updated 14 Feb 2012)

SETFIGDOCKED allows docking figures at specified positions in group of figures whose structure is

| Watch this File

File Information
Description

group = setfigdocked('PropertyName1',value1,'PropertyName2',value2,...)
  PropertyName:
      - GroupName name of group need to be generated
      - GridSize scalar or vector quantity, defines number of rows
                    and columns of cell in group
      - SpanCell vector or matrix quantity, size n x 4,
                    [row col occupiedrows occupiedcols]
                    build an cell at the position (row, col) in group
                    cell (GridSize) which occupies "occupiedrows"
                    rows and "occupiedcols" columns
      - Figure handle of figure
      - Figindex index position of figure in group cell
      - Maximize 0/1, maximize group
      - GroupDocked 0/1, dock group

Example:
         group = setfigdocked('GroupName','Image and Edges','GridSize',3,'SpanCell',[1 2 2 2]);
         im1 = imread('cameraman.tif');
         figure;imshow(im1);set(gcf,'Name','Cameraman','NumberTitle','off')
         group = setfigdocked('GroupName','Image and Edges','Figure',gcf,'Figindex',2);
 
         figure; edge(im1,'prewitt');set(gcf,'Name','Prewitt method','NumberTitle','off')
         group = setfigdocked('GroupName','Image and Edges','Figure',gcf,'Figindex',1);
 
         figure; edge(im1,'roberts');set(gcf,'Name','Roberts method','NumberTitle','off')
         group = setfigdocked('GroupName','Image and Edges','Figure',gcf,'Figindex',3);

         figure; edge(im1,'roberts');set(gcf,'Name','Roberts method','NumberTitle','off')
         group = setfigdocked('GroupName','Image and Edges','Figure',gcf,'Figindex',4);

         figure; edge(im1,'roberts');set(gcf,'Name','Roberts method','NumberTitle','off')
         group = setfigdocked('GroupName','Image and Edges','Figure',gcf,'Figindex',5);

         figure; edge(im1,'canny');set(gcf,'Name','Canny Method','NumberTitle','off')
         group = setfigdocked('GroupName','Image and Edges','Figure',gcf,'Figindex',6);

         group = setfigdocked('GroupName','Image and Edges','Maximize',1,'GroupDocked',0);

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
FindJObj - find java handles of Matlab graphic objects
This submission has inspired the following:
Dynamical Systems Toolbox

MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements This function runs on MATLAB 7.1 sp3 or higher
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
11 Feb 2009 Sebastian Hölz

SWEET !!!
Great job. I've been searching the Matlab Java Archives for the appropriate objects/methods/properties for (almost) years and just could not find them. The docking of figures into seperate containers is a great way to organize your work-flow, if you have lots of figures to work with at the same time and don't want to get lost. I'll highly recommend to look into this ...

30 Nov 2010 Pirmin Borer

Really good tool. I also tried for a while how to set up groups with the DTgroup class, it takes a while to understand matlabs built-in java. So thanks very much!!!!

14 Feb 2012 Yair Altman

take at look at the related utility setFigDockGroup - http://www.mathworks.com/matlabcentral/fileexchange/16650-setfigdockgroup

Please login to add a comment or rating.
Updates
14 Feb 2012

Fix errors which occur MATLAB v.2009 and later release

14 Feb 2012

Fix errors on Matlab v2009 and later releases

Tag Activity for this File
Tag Applied By Date/Time
gui tools Anh Huy Phan 22 Oct 2008 09:40:20
example Anh Huy Phan 22 Oct 2008 09:40:20
setfigdocked setgroupdocked java docked figure Anh Huy Phan 22 Oct 2008 09:40:20
gui Anh Huy Phan 14 Feb 2012 10:32:18

Contact us at files@mathworks.com