Using java swing components in MATLAB
JCONTROL provides an easy way to integrate a full range of java GUIs from the java.awt and javax.swing libraries into MATLAB. Example: obj=JCONTROL(Parent, Style); obj=JCONTROL(Parent, Style,... PropertyName1, PropertyValue1,... PropertyName2, ProeprtyValue2....); Inputs: Parent: the handle of a MATLAB figure or other container for the resulting component Style: string describing a java component e.g. 'javax.swing.JPanel', 'javax.swing.JButton' A JCONTROL object aggregates the MATLAB handle graphics container and the Java component (as returned by MATLAB's JAVACOMPONENT function) into a single object. Access to the JCONTROL's properties is provided by GET/SET calls. MATLAB dot notation may also be used. This notation also provides access to the java object's methods e.g. pos=myobject.Position; sz=myObject.getSize; myobject.setEnabled(1); myobject.setToolTipText('My tip'); myobject.setOpaque(1); The class has been modified so that all jcontrol objects have a uipanel ancestor. This is to accommodate changes to the javacomponent.m function introduced in ML R2008b by TMW. The changes should be backwards compatible - tested with R2006a/R2008b.
- 1
- 粉丝: 1
- 资源: 8
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助