Search Results for: gui

180 relevant articles found:

Setting status-bar components

I last week’s post, Setting status-bar text, I showed how to set the status-bar text in Matlab figures and the main desktop. But Matlab status-bars are Java containers in which we can add GUI controls, not just simple text labels. In this post I will show how to do this for Matlab 7 figures. Let’s return to the two alternatives I’ve presented in my previous post for setting a Matlab 7 figure status-bar text: % Alternative #1 (… Continue reading

Categories: Figure window, GUI, Java, Medium risk of breaking in future versions
Tags: , , ,
15 Comments

JTattoo look-and-feel demo

Three years ago, I wrote an article about modifying Matlab’s look-and-feel (L&F, or LnF), using Java’s built-in support for replaceable LnFs. To date, that article has 27 comments by 13 different commenters (plus 20 responses by me), making it the second most active article on this website. I decided to follow up on that article with a demo that shows the effects that different L&Fs have on GUI controls, and a demonstration… Continue reading

Categories: Guest bloggers, GUI, Java, Medium risk of breaking in future versions, UI controls
Tags: , , , ,
13 Comments

Undocumented button highlighting

One of my consulting clients approached me yesterday with a mystery: In his GUIDE-generated GUI, one of the buttons had a bluish tint, and no obvious property seemed to control this or to differentiate it from its sibling controls. Here’s a parred-down version of his GUI: Highlighted GUI button So while it was very nice to have a highlighted button in this manner, the fact that he did not know why it happened and how to control it was a bi… Continue reading

Categories: GUI, Low risk of breaking in future versions, UI controls, Undocumented feature
Tags: , , , ,
Leave a comment

Rich Matlab editbox contents

…javax.swing.text.html.HTMLEditorKit); % alternative: jEditbox.setContentType(‘text/html’); htmlStr = ['<b><div style="font-family:impact;color:green">’… ‘Matlab</div></b> GUI is <i>’ … ‘<font color="red">highly</font></i> customizable’]; jEditbox.setText(htmlStr) HTML contents in a Matlab editbox Let’s show another usage exampl… Continue reading

Categories: GUI, High risk of breaking in future versions, Java, UI controls
Tags: , , ,
51 Comments

Tri-state checkbox

When presenting information visually in graphical user interfaces (GUIs), we often need to present and enable interaction with state data (such as On/Off). In most cases, we would naturally use a checkbox to present the information and enable interaction. But What can we do if the data has three possible states. For example, Yes/No/Maybe, or: Full/Empty/Partial, or: Up/Down/Undetermined ? Until today, Matlab GUIs had to resort to using drop-down… Continue reading

Categories: GUI, Java, Medium risk of breaking in future versions, UI controls, Undocumented feature
Tags: , , , , ,
5 Comments

GUI integrated HTML panel

Last week, I explained how a browser control can be integrated in Matlab GUI applications. Sometimes we only need to display simple HTML, for which a full browser seems like overkill. Moreover, we may wish to edit the displayed contents, which cannot be done using the browser control. The solution is to use a standard Java Swing JEditorPane control, which is an editable HTML-aware control. Oddly enough, it was only yesterday that Mikhail, a know… Continue reading

Categories: GUI, Java, Low risk of breaking in future versions, UI controls
Tags: , , , ,
3 Comments

Unorthodox checkbox usage

…underlying problem description is easy: we wish to have the ability to split a Matlab uipanel into two or more sub-panels, separated by a draggable horizontal/vertical divider. Such split-panes are standard in any semi-decent GUI, but for some reason were never incorporated in official Matlab. This is a real pity, but not to worry as there are at least two alternatives we could use: UISplitPane UISplitPane is a utility that I wrote back in 2009 t… Continue reading

Categories: GUI, Medium risk of breaking in future versions, UI controls
Tags: , , ,
1 Comment

Figure window customizations

…yboard shortcuts/accelerators, font colors/styles, callbacks, icons etc. (details1, details2) Control figure docking in compiled (deployed) applications (details1, details2) Display an integral figure status-bar with text and GUI controls (details1, details2). A few other features that I will not discuss here As you can see, there are numerous very interesting customizations that can be done to Matlab figures which rely on the undocumented imple… Continue reading

Categories: Figure window, GUI, Hidden property, High risk of breaking in future versions, Java, Undocumented feature
Tags: , , , ,
Leave a comment

Font selection components

…oints’ FontSize: 10 Matlab’s uisetfont dialog The main drawback of uisetfont is the fact that it displays a separate non-resizable modal dialog window. We cannot embed uisetfont within our own panel, integrated in our GUI figure. DesktopFontPicker DesktopFontPicker is a Swing component that presents a font selection panel that can easily be inserted into any Matlab GUI container (figure, panel or tab) using the javacomponent function: fo… Continue reading

Categories: GUI, Java, Medium risk of breaking in future versions, Undocumented feature
Tags: , , , ,
3 Comments

Fixing a Java focus problem

An aspect of Matlab GUIs that include Java components that is often encountered (most recently reported yesterday) and is easily fixed, is Matlab’s default exclusion of all javacomponents from its focus traversal cycle. This means that if we place several uicontrols and javacomponents together onscreen, clicking TAB or Shift-TAB will only move the focus between the regular uicontrols, but none of the javacomponents. The javacomponents can… Continue reading

Categories: GUI, Java, Medium risk of breaking in future versions, Undocumented feature
Tags: , ,
23 Comments