Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » MenuBar is not displayed check image.
MenuBar is not displayed check image. [message #52076] Tue, 08 April 2003 23:15 Go to next message
Eclipse UserFriend
Originally posted by: narushima_to.ybb.ne.jp

MenuBar is not displayed check image.
(e,g, "Window" -> "Lock the Toolbar" is to display check image.)

But, I can't create to display check button in menu.


how to create checkbox button in menu bar?

--

public class XXXAction extends Action {
public void run() {
setChecked(!isChecked);
}
}

class XXXContributor extends BasicTextEditorActionContributor {

MenuManager manager;

public XXXContributor() {
super();
manager = new MenuManager("XXX");
manager.add(new XXXAction() );
}

public void contributeToMenu(IMenuManager menuManager) {
super.contributeToMenu(menuManager);
menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
}
}

--

but don't display check image.

--
Narushima Hironori mailto:narushima_to@ybb.ne.jp
Re: MenuBar is not displayed check image. [message #52387 is a reply to message #52076] Fri, 11 April 2003 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dwhitema.us.ibm.com

ask on eclipse.tools newsgroup

"Narushima Hironori" <narushima_to@ybb.ne.jp> wrote in message
news:b6vkqk$bsp$1@rogue.oti.com...
> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)
>
> But, I can't create to display check button in menu.
>
>
> how to create checkbox button in menu bar?
>
> --
>
> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }
>
> class XXXContributor extends BasicTextEditorActionContributor {
>
> MenuManager manager;
>
> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }
>
> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }
>
> --
>
> but don't display check image.
>
> --
> Narushima Hironori mailto:narushima_to@ybb.ne.jp
Re: MenuBar is not displayed check image. [message #65338 is a reply to message #52076] Sun, 22 August 2004 04:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: krystox.gmail.com

The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}

Then you can use isChecked() to get the status.


Narushima Hironori wrote:

> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)

> But, I can't create to display check button in menu.


> how to create checkbox button in menu bar?

> --

> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }

> class XXXContributor extends BasicTextEditorActionContributor {

> MenuManager manager;

> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }

> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }

> --

> but don't display check image.
Re: MenuBar is not displayed check image. [message #65359 is a reply to message #52076] Sun, 22 August 2004 04:50 Go to previous message
Eclipse UserFriend
Originally posted by: krystox.gmail.com

The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}

Then you can use isChecked() to get the status.



Narushima Hironori wrote:

> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)

> But, I can't create to display check button in menu.


> how to create checkbox button in menu bar?

> --

> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }

> class XXXContributor extends BasicTextEditorActionContributor {

> MenuManager manager;

> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }

> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }

> --

> but don't display check image.
Re: MenuBar is not displayed check image. [message #592911 is a reply to message #52076] Fri, 11 April 2003 17:39 Go to previous message
David Whiteman is currently offline David WhitemanFriend
Messages: 166
Registered: July 2009
Senior Member
ask on eclipse.tools newsgroup

"Narushima Hironori" <narushima_to@ybb.ne.jp> wrote in message
news:b6vkqk$bsp$1@rogue.oti.com...
> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)
>
> But, I can't create to display check button in menu.
>
>
> how to create checkbox button in menu bar?
>
> --
>
> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }
>
> class XXXContributor extends BasicTextEditorActionContributor {
>
> MenuManager manager;
>
> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }
>
> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }
>
> --
>
> but don't display check image.
>
> --
> Narushima Hironori mailto:narushima_to@ybb.ne.jp
Re: MenuBar is not displayed check image. [message #597955 is a reply to message #52076] Sun, 22 August 2004 04:47 Go to previous message
Eclipse UserFriend
Originally posted by: krystox.gmail.com

The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}

Then you can use isChecked() to get the status.


Narushima Hironori wrote:

> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)

> But, I can't create to display check button in menu.


> how to create checkbox button in menu bar?

> --

> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }

> class XXXContributor extends BasicTextEditorActionContributor {

> MenuManager manager;

> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }

> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }

> --

> but don't display check image.
Re: MenuBar is not displayed check image. [message #597961 is a reply to message #52076] Sun, 22 August 2004 04:50 Go to previous message
Eclipse UserFriend
Originally posted by: krystox.gmail.com

The only thing you need to do is override the constructor of Action like
this:
public MyAction(){
super("Name", IAction.AS_CHECK_BOX);
}

Then you can use isChecked() to get the status.



Narushima Hironori wrote:

> MenuBar is not displayed check image.
> (e,g, "Window" -> "Lock the Toolbar" is to display check image.)

> But, I can't create to display check button in menu.


> how to create checkbox button in menu bar?

> --

> public class XXXAction extends Action {
> public void run() {
> setChecked(!isChecked);
> }
> }

> class XXXContributor extends BasicTextEditorActionContributor {

> MenuManager manager;

> public XXXContributor() {
> super();
> manager = new MenuManager("XXX");
> manager.add(new XXXAction() );
> }

> public void contributeToMenu(IMenuManager menuManager) {
> super.contributeToMenu(menuManager);
> menuManager.insertAfter(IWorkbenchActionConstants.M_EDIT, manager);
> }
> }

> --

> but don't display check image.
Previous Topic:Plugin communication
Next Topic:get plugin-id
Goto Forum:
  


Current Time: Thu Dec 26 11:03:51 GMT 2024

Powered by FUDForum. Page generated in 0.04187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top