Thread Subject:
Access document bar's context menu

Subject: Access document bar's context menu

From: Matthias Michelsburg

Date: 1 Jul, 2012 15:47:06

Message: 1 of 1

Does anybody know a possibility to access and change the context menu of the Matlab Editor's document bar?
I'd like to add a button like the 'alphabetize' button for a customized sorting routine.
The menu can be found by rightclick on the document bar itself or by the editor's menu bar (Desktop->Document Bar).
I tried to access the javahandle of the menu and change its properties with findjobj and some hints from undocumented matlab, but couldn't find the right properties.

This is the code I used so far:

desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
% findjobj(jEditor)
jh_db = findjobj(jEditor,'class','com.mathworks.widgets.desk.DTDesktopMenu$DocumentBarMenu')

I'm really new to java programming and have no clue how to go on.

-Matthias

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
java Matthias Michelsburg 1 Jul, 2012 11:49:10
context menu Matthias Michelsburg 1 Jul, 2012 11:49:10
undocumented Matthias Michelsburg 1 Jul, 2012 11:49:10
matlab editor Matthias Michelsburg 1 Jul, 2012 11:49:10
rssFeed for this Thread

Contact us