# Modelit JavaComponent Toolbox documentation

## Alfabetic Class Reference

Class | Description
modelit.ui.AbstractJacontrol | BaseClass for modelit.ui.Jacontrol.
modelit.ui.Button | An ordinary button with a text string or an image, or both. To activate a button, click with the left mousebutton on the button and a callback will be executed.
modelit.ui.CheckBox | An item with a text string or an image, or both, that can be selected or deselected Checkboxes are intended for providing the user with a number of independent choices. Checkboxes trigger a callback when selected and indicate their state on the display. To activate a checkbox, click the mouse button on the object.
modelit.ui.ComboBox | A component that combines a button and an editable field. A combobox can open up by pressing the button to display a list of choices which can selected with the mouse. A new choice may also be modified by typing in the textfield, as the user types the set of possible choices will narrow down When not open, a combobox indicates the current choice. Comboboxes are useful when you want to provide users with a number of mutually exclusive choices, but do not want to take up the amount of space that a series of radio buttons requires A callback is triggered after a user has changed the selected item.
modelit.ui.CountDown | A CountDown shows a timer that counts down and which executes a callback upon reaching zero.
modelit.ui.DatePicker | A DatePicker is a component that combines a button, an editable field and a component that displays a monthly calendar. The user can select a date from the calendar component, which appears when the button is pressed. The selection from the calendar component will be displayed in an editable field in customizable date format. Values may also be modified manually by entering a date into the editable field using one of the supported date formats.
modelit.ui.DomEcho | A component that displays the (D)ocument (O)bject (M)odel of an xml-object in a tree. The user can inspect the xml structure and contents by browsing through its tree representation.
modelit.ui.EditorPane | An EditorPane is a styled text component that can display editable text using more than one font. JEditorPanes can be easily loaded with HTML formatted text from a URL, which makes them useful for displaying uneditable help information.
modelit.ui.Empty | Modelit.ui.Jacontrol placeholder
modelit.ui.HyperLink | A component that displays a hyperlink. A callback is triggered when the user clicks on the hyperlink.
modelit.ui.Jacontrol | Base class for all java components.
modelit.ui.Label | A Label is a display area for a text string or an image, or both. The label's contents can be aligned by setting the vertical and horizontal alignment. HTML can be used to format the label's text.
modelit.ui.Panel | A container for a modelit.ui.Jacontrol object. The panel's border, background and title can be adjusted. The layout is managed by a gridbaglayout manager, see the add method
modelit.ui.PasswordField | A PasswordField is a specialized text fields for password entry. For security reasons, a password field does not show the characters that the user types. Instead, the field displays a character different from the one typed, such as an asterisk '*'. Like an ordinary text field, a password field can trigger a callback when the user indicates that text entry is complete, for example by pressing the Enter button.
modelit.ui.ProgressBar | A progressbar typically communicates the progress of some work by displaying its percentage of completion and possibly a textual display of this percentage. To indicate that a task of unknown length is executing, the progressbar can be put into indeterminate mode. While the bar is in indeterminate mode, it animates constantly to show that work is occurring.
modelit.ui.RadioButton | A Radiobutton is an item with a text string or an image, or both, that can be selected or deselected. Radiobuttons are similar to checkboxes, but are intended to be mutually exclusive within a group of related radiobuttons (only one is in a pressed state at any given time). Radiobuttons generate an action when selected and indicate their state on the display. To activate a radiobutton, click the mouse button on the object.
modelit.ui.ScrollPane | A container that provides a scrollable view of its contents.
modelit.ui.Separator | A Separator is a visual divider line that can be used in a GUI. Separators can detect mouse dragging and are therefore useful for making resizable panes.
modelit.ui.Slider | A slider is a component that lets the user graphically select a value by sliding a knob within a bounded interval. The slider can show major tick marks, minor tick marks and labels between them. Users move the bar by pressing the mouse button and dragging the pointer over the bar, or by clicking in the trough. By releasing the mouse button a callback is triggered. The location of the bar indicates a numeric value. Specifies the next component to get the focus after this one, for example, when the tab key or shift-tab key is used.
modelit.ui.Spinner | A spinner is a single line input field with two arrow buttons that lets the user select a value from an ordered sequence. The user may type a (legal) value directly into the spinner or use the arrow buttons or the keyboard up/down arrow keys to select a value from the sequence. Although combo boxes provide similar functionality, spinners are sometimes preferred because they don't require a drop down list that can obscure important data. A callback is triggered when the user changes the selected value in the spinner.
modelit.ui.SplitPane | A container that can be divided horizontally or vertically in two parts. The two parts can be interactively resized by the user.
modelit.ui.TabbedPane | A component that lets the user switch between a group of components by clicking on a tab with a given title.
modelit.ui.Table | A table with sorting and filtering support. Furthermore the table has some built in features to render icons, dates, comboboxes, Change color of foreground and background of the table cells etc.
modelit.ui.TextEditor | A TextEditor is a text component that can display editable text. In the lower right corner the line and column position of the cursor is indicated. It is possible to show colored linenumbers with tooltips (TooltipSet). For example to show errors.
modelit.ui.TextField | A textfield which can display only one line of editable text. The textfield's contents can be aligned by setting the horizontal alignment. A callback is triggered after the text entry is completed with enter or tab.
modelit.ui.TextPane | An area that can display multiple lines text. A textpane is not editable and all of the text is in the same font. Use the TextEditor style to provide the user an editable textcomponent.
modelit.ui.ToggleButton | A button with a text string or an image, or both, that can be selected or deselected. Togglebuttons are controls that execute callbacks when clicked on and indicate their state, either on or off. To activate or deactivate a push button, click the mouse button on the togglebutton.
modelit.ui.ToolBar | A ToolBar is a container that groups several jacontrols (usually buttons with icons) into a row or column.
modelit.ui.TreeTable | A treetable for display of hierarchical data. Furthermore the table has some built in features to render icons, dates, comboboxes, Change color of foreground and background of the table cells etc.
xml | Constructor for an xml-object

## Alfabetic Function Reference

Function | Description
assertm | Check condition. If false call error(msg)
CallbackChain | Add an extra callback to an object. This is for example useful in combination with zoomtool
cell2hashtable | Convert cellarray to a java hashtable
cell2str | Convert cell array to a string.
centimeters2pixels | Short hand for converting centimeters to pixels.
chararray2char | Convert char array to string.
debugline | Print debug info on console
decomment_line | Remove comment from separate line
demo_javacomponent | Demo of modelit.ui.Jacontrol components
dirtree | List all subdirectories (recursive) in struct array.
do_jacontrol | Identical to jacontrol
dprintf | Shortcut for disp(sprintf(formatstr,arg1,arg2,...))
extensie | Verify extension, append extension if needed
getCode | Get code of subfunction in an .m file.
getDefaultFont | Get default matlab font voor uicontrols.
getMatlabVersion | Retrieve Matlab version as numeric constant.
getproperty | Return matching char string from cell array of keywords
getRoot | Get root of current directory.
hashtable2cell | Convert a java java.util.Hashtable to a cellarray
im2javaRGB | Convert image to Java image for RGB values with transparancy
im2javaRGB | Convert image to Java image for RGB values with transparancy
inches2pixels | Short hand for converting inches to pixels.
installjar | Create a classpath.txt file.
jacontrol | Construct a modelit.ui.Jacontrol object and set user defined properties.
javacolor2rgb | Convert Java color to Matlab color triple.
javaRGB2im | Convert RGB values with transparancy to javaimage
matlab2javadateformat | Convert string with matlab dateformat to a java dateformat, mainly to use with tables.
movegui_align | Similar to MOVEGUI but position figure relative to other figure instead of position on screen. Treat other window as scree area CALL movegui_align(fig,hrelfig,position)
moveonscreen | Work around for Matlab bug in Matlab 2013a (multimonitor display not detected)
pixels2centimeters | Short hand for converting pixels to centimeters.
pixels2inches | Short hand for converting pixels to inches.
pixels2points | Short hand for converting pixels to points.
points2pixels | Short hand for converting points to pixels.
randpick | Randomly pick one of a collection of items.
readcellrows | Read file and store in a cellstr.
readcellrows_alternative | Alternative implementation of readcellrows
readstr | Read character array from file.
rgb2javacolor | Convert Matlab rgb triple to a java color.
rootpath | Expand filename with path of (read only) directory that holds compiled matlab executable (in deployed mode), or invariant (in non deployed mode). This function is intended to allow running a compiled application while "pwd" is unequal to fileparts(applic.exe). Usually exeroot will be read only.
serializeDOM | Serialise a DOM by transformation to a string or file
set_resizefcn | Set the resize function for a figure. The property name for the resize function has changed in R2016a.
str2fieldname | Convert string to fieldname that can be used in Matlab structure
struct2treemodel | Fast way to convert structure to treemodel for use in treetable
struct2xmlobj | Struct2xmlobj is a function. obj = struct2xmlobj(S)
testButton | Create a button
testCheckBox | Create a checkbox
testComboBox | Create a combobox
testCountDown | Create a CountDown
testDatePicker | Create a DatePicker
testEditorPane | Create an EditorPane
testHyperLink | Create a hyperlink
testLabel | Create a label
testMapViewer | Create a mapviewer
testNestedPanel | Create a panel divided in four panels with four buttons
testPanel | Create a panel
testPasswordField | Create a passwordfield
testProgressBar | Create a ProgressBar
testRadioButton | Create a radiobutton
testScrollPane | Create a ScrollPane
testSlider | Create a slider
testSpinner | Create a spinner
testSplitPane | Create a SplitPane
testTabbedPane | Create a TabbedPane
testTable | Create a Table
testTextEditor | Create a TextEditor
testTextField | Create a textfield
testToggleButton | Create a togglebutton
testToolBar | Create a ToolBar
testTreeTable | Create a TreeTable
toStr | Convert object to string representation.
utilspath | Return string containing path to utils directory
varargin2struct | Convert parameter-value combinations to structure
vararginSubset | Split argument list in two groups.
waitformsgbox | Shortcut code for modal warning dialog
writestr | Write str to an ASCII file.

### 30 Mar 2023 18:46