Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Really Stuck, stacking, scrolling, clipping issue.

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: Johnathan

Date: 15 Jun, 2009 15:45:05

Message: 1 of 8

Here is my problem:

http://img194.imageshack.us/img194/8616/tablescrolloverlap.jpg

See how the tables are scrolling over the axes but under the scroll bar?
I need the tables to scroll so that they go behind the panel or appear to go behind the panel.

uistack documentation says you can't stack uicontrols in front of axes and
clipping doesn't work on uicontrols.

I really can't figure this one out, and I can't find anything on the internet but other people asking the same question.

How can I get these listboxes to stay in their panel or appear to?

I am on the verge of just locking the position vectors of two figures together and having them mimic each other, but that is a really ugly solution that will require me to basically recode this GUI window for my program.

Does Matlab really not have the power to do this? I think it must, because it seems like a commonplace thing to want to do--have two scrolling panels. Why are axes in the lowest level? Why can't clipping work on uicontrols?

I know that a lot of the graphics are java based. I am willing to try and code some java if need be.

Sorry for asking this question about fifty different ways guys, but I am super stuck. I have posted this question elsewhere on the web, but not gotten any answers there either.

Thanks guys
--John

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: Steven Lord

Date: 15 Jun, 2009 17:11:35

Message: 2 of 8


"Johnathan " <durchfalldurchfall@yahoo.com> wrote in message
news:h15qa1$ljc$1@fred.mathworks.com...
> Here is my problem:
>
> http://img194.imageshack.us/img194/8616/tablescrolloverlap.jpg
>
> See how the tables are scrolling over the axes but under the scroll bar?
> I need the tables to scroll so that they go behind the panel or appear to
> go behind the panel.

I don't know the answer to this offhand. You should contact Technical
Support.

--
Steve Lord
slord@mathworks.com

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: Johnathan

Date: 15 Jun, 2009 17:25:04

Message: 3 of 8

Thanks for the quick reply Steve.

I guess I'll call.

In the meantime,
I don't know anything about working with java in matlab. Is it possible to use matlab to make the plots and tables and whatnot and then write a java method to display them and make them do what I want?

Where would be the best place to start reading about that?

Thanks
--John

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: Bruno Luong

Date: 15 Jun, 2009 18:29:03

Message: 4 of 8

"Johnathan " <durchfalldurchfall@yahoo.com> wrote in message <h1605f$jpj$1@fred.mathworks.com>...

>
> Where would be the best place to start reading about that?
>

Probably Yair's blog: http://undocumentedmatlab.com/

Bruno

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: matt dash

Date: 15 Jun, 2009 18:37:01

Message: 5 of 8

"Johnathan " <durchfalldurchfall@yahoo.com> wrote in message <h1605f$jpj$1@fred.mathworks.com>...
> Thanks for the quick reply Steve.
>
> I guess I'll call.
>
> In the meantime,
> I don't know anything about working with java in matlab. Is it possible to use matlab to make the plots and tables and whatnot and then write a java method to display them and make them do what I want?
>
> Where would be the best place to start reading about that?
>
> Thanks
> --John

As far as i know it is impossible to stack a table below an axes, and I have tried many times. Java objects (including uicontrols) are always on top. You can only stack axes on top of other axes, or uipanels. Even if you put a java object in a uipanel and put the panel below an axes, the java object will be drawn on top. I have resorted to drawing tables with lines and text objects in axes to get around this, with the scrollbars drawn with shapes. (I dont recommend trying this btw) But from your example if you can just show all your info in one table you can scroll the table view instead of scrolling the whole table.

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: Johnathan

Date: 15 Jun, 2009 23:26:16

Message: 6 of 8

so I have to subscribe to matlab technical support before I can ask a question it seems. I'm going to try to implement this with java.
I am not very excited, but we'll see.
I'll try to share what I code and find out.

--John

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: Yair Altman

Date: 16 Jun, 2009 00:35:17

Message: 7 of 8

"Johnathan " <durchfalldurchfall@yahoo.com> wrote in message <h16lao$gp2$1@fred.mathworks.com>...
> so I have to subscribe to matlab technical support before I can ask a question it seems. I'm going to try to implement this with java.
> I am not very excited, but we'll see.
> I'll try to share what I code and find out.
>
> --John

Johnathan,

For starters, start using my UIINSPECT and FINDJOBJ utilities on the File Exchange to familiarize yourself with the way uicontrols and axes are used within their Java containers. It seems that a large part of the reason for the difficulties you mentioned is due to the way axes and uicontrols are implemented. In a nutshell, axes and panels are both apparently painted on a JAWT canvas (a com.mathworks.hg.peer.FigureAxisComponentProxy$_AxisCanvas object), which is z-ordered beneath the uicontrols JPanel (a com.mathworks.hg.peer.FigureComponentContainer object). This is done using their common parent's OverlayLayout manager. You can set axes on top of uicontrols by simply switching their z-order in their common parent, but then all uicontrols will disappear since the AxisCanvas is opaque and extends over the entire content pane. This can be used to temporarily hide figure uicontrols (for
example, when printing GUIs I sometimes want to print the plot axes but not the uicontrols). But in general this behavior is of course undesirable.

If all this is Chinese to you, then you should probably save yourself the time and frustration in diving into it. If not, please use these pointers and let us all know if you make some progress.

BTW, don't waste time on TMW support - all this is entirely undocumented and unsupported. The official response will probably be something like "thanks for contacting us but this can't be done so please submit an enhancement request via the online form", or something like that. And they really can't be blamed for this...

Yair Altman
http://UndocumentedMatlab.com
 

Subject: Really Stuck, stacking, scrolling, clipping issue.

From: Johnathan

Date: 16 Jun, 2009 02:07:01

Message: 8 of 8

hey thanks Yair. I guess you can ignore that email I sent you now :)

Yeah, I have already started converting this part of the gui into multiple figures, but this is not the form I would like.

I am going to dive into it, though it is a little Oriental sounding. I know learning some Java beyond what I do know can only help me out in the future.

I had been wondering how Matlab did the ordering with uistack and wondered if that parameter could not just be changed. In the email I sent, I asked if I could box the axes up in some type of java graphics object so that they can be reordered without covering up the other controls.

I appreciate the response and I will start messing with it.

Thanks for the info,
--John

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us