Wie füge ich mit MagicDraw OpenAPI eine neue Schaltfläche zur Hauptmenüleiste hinzu?Java

Java-Forum
Guest
 Wie füge ich mit MagicDraw OpenAPI eine neue Schaltfläche zur Hauptmenüleiste hinzu?

Post by Guest »

Ich arbeite mit der MagicDraw OpenAPI und möchte der Hauptmenüleiste von MagicDraw rechts neben der Schaltfläche „Hilfe“ eine neue Schaltfläche mit dem Namen „TEST“ hinzufügen (siehe Abbildung unten).
Image

Hier sind nützliche Ressourcen
  • online doc
  • javadoc
Hier ist mein aktuelles Codebeispiel:

Code: Select all

public class Main extends Plugin{
public void init()
{
initialized = true;
NMAction action = new MyAction("test", "TEST");
MainMenuConfiguration configurator = new MainMenuConfiguration((MyAction) action);
ActionsConfiguratorsManager.getInstance().addMainMenuConfigurator(configurator);
}
}
public class MainMenuConfiguration implements AMConfigurator {
public void configure(ActionsManager actionsManager) {
ActionsCategory newCategory = new ActionsCategory("idTest", "TEST");
ActionsManager newManager = new ActionsManager();
newManager.addCategory(newCategory);

}
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post