From: <HIDDEN>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to add a new property to a handle?
Message-ID: <ef537ba.3@webcrossing.raydaftYaTP>
Date: Thu, 5 Apr 2007 17:28:44 -0400
References: <ef537ba.-1@webcrossing.raydaftYaTP> <ev3kqk$cui$1@canopus.cc.umanitoba.ca> <ef537ba.1@webcrossing.raydaftYaTP> <ev3nli$g8b$1@canopus.cc.umanitoba.ca>
Lines: 29
NNTP-Posting-Host: 80.178.76.226
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:401896



Walter Roberson wrote:
>> The reason is that I'm trying to expand uicontrol to accept all
sortsof other GUI elements (like javax.swing.JSpinner etc.).
>
> That sounds like you would need not only new properties for
> uicontrol, but also new valid Style values.

Exactly - I planned to add the entire set of Swing elements - if the
user passed a known uicontrol style then the regular (internal)
uicontrol() function would be called. Otherwise, javacomponent would
be called with all the supplied properties. In any case, a single
handle object would be returned to the caller.

A simple logical extension would then be for my new function to
accept ANY java classname inheriting from java.awt.Component (e.g.,
'java.awt.Scrollbar'), but all the famous components would get simple
aliases, so a user could set the style to either
'javax.swing.JTable', 'JTable' or simply 'Table'.

The need for this is that uicontrol() is currently limited to a very
few types of GUI components - many more are available that would be
of much use to the Matlab community (JSpinner, JTable, JTabbedPane,
JSplitPane, JTree etc. etc.). I want a generalized uicontrol() that
would be as transparent as possible to the end user.

The only remaining piece of puzzle is how to unify the properties in
the control's HG container - that's what I'm looking for.

Yair Altman