Code covered by the BSD License  

Highlights from
Making MATLAB Swing More

5.0

5.0 | 1 rating Rate this file 43 Downloads (last 30 days) File Size: 437.37 KB File ID: #34235
image thumbnail

Making MATLAB Swing More

by Malcolm Lidierth

 

16 Dec 2011 (Updated 09 Mar 2012)

Import of Java Swing GUIs from Eclipse, NetBeans, IntelliJ etc

| Watch this File

File Information
Description

GImport supports the import of Java Swing-based GUIs. These can be designed by hand or by using one of the many free GUI designers such as those in Eclipse, NetBeans or IntelliJ IDEA.

If you find MATLAB GUIDE-designed GUIs limiting, GImport may be what you are looking for.

To import a GUI simply put your jar file on the MATLAB Java class path and provide an instance to the GImport constructor
g=GImport(MATLABContainer, mypackage.myclass());

MATLABContainer can be any MATLAB container e.g. a figure or uipanel.

The GImport class methods do the work as explained in the accompanying PDF documentation. This includes active layout management that causes the GUIs to resize in the same way as ‘normalized’ MATLAB figure components.

In addition, GImport supports Swing JFrames as containers:
g=GImport(JFrame, mypackage.myclass());
A GXJFrame function for thread-safe creation of JFrames is included.

The GImport class provide easy-to-use methods for thread-safe modification of the GUIs on-the-fly, MATLAB callback setup etc. together with support for Drag & Drop.

An up-to-date copy of the jcontrol class is from Project Waterloo is included. Older versions of this class should be removed.

Part of Project Waterloo from King's College London - see http://sigtool.sourceforge.net/

Required Products MATLAB
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
18 Dec 2011 Sebastien PARIS  
27 Dec 2011 Malcolm Lidierth

Fix
obj.hide on Line 177 should be moved to after the drawnow() at line 205 for the active layouts to be set up correctly. I'll post a fix.

Please login to add a comment or rating.
Updates
28 Dec 2011

Fix hide before drawnow/layout.

11 Jan 2012

Add GXJFrame function and support for JFrames

09 Mar 2012

Add support for externally created GUIs with no MATLAB container

Tag Activity for this File
Tag Applied By Date/Time
gui Malcolm Lidierth 16 Dec 2011 09:34:05
swing Malcolm Lidierth 16 Dec 2011 09:34:05
java Malcolm Lidierth 16 Dec 2011 09:34:05
intellij Malcolm Lidierth 16 Dec 2011 09:34:05
netbeans Malcolm Lidierth 16 Dec 2011 09:34:05
eclipse Malcolm Lidierth 16 Dec 2011 09:34:05
gui Greg Bacon 09 Mar 2012 14:28:11

Contact us at files@mathworks.com