Contents     Functions         Previous Next     PDF Index

sdtroot, sdt_locale

Purpose

Base SDT gui figure handling.

Description

This function is used to implement base SDT mechanisms for tabs shown in JAVA GUI.

Init

Commands for tab initialisation/refreshing. InitPTree is an example of initialization of the navigation pane. InitProject implements the typical project tab which is detailed in section 8.1.2. InitPref opens the SDT preference editor.

Set

Commands for property setting. Implements SetPref for preferences, SetProject for generic project parameters and and generic setting of fields defined in PARAM.

The default mechanism for set is to specify the tab in the command and provide data to be set a structure where each field describes a cell in the tab. An example for the Project tab.

tdir=sdtdef('tempdir');
sdtroot('SetProject',struct('ProjectWd',tdir, ... % Root file location
    'PlotWd',fullfile(tdir,'plots'), ...          % Plot directory
    'PlotWord',fullfile(tdir,'tmp_word.docx')));  % Word file for image insert

PARAM

PARAM commands are used to retrieve data stored normally stored in the userdata of the project figure.

OsDic

Each project figure supports a dictionnary (or OsDic) of named comgui objSet styles that can be used to format figures, images, ... The following illustrates simple manipulations, for a list of usual categories see section 8.1.

% Sample style definition, see examples in d_imw
my_style={'position',[NaN,NaN,1087,384],'@line',{'linewidth',5}};
sdtroot('InitOsDic'); % Display list of named styles
sdtroot('setOsDic',{'ImMyStyle',my_style}) % Associate ImMyStyle name to this style
figure(1);plot([0 1]);
comgui('objset',1,{'@OsDic(SDT Root)','ImMyStyle'}); % Apply named style

©1991-2016 by SDTools
Previous Up Next