I am overriding the getActions() method to customize the behavior of the popup menu when my TopComponent tab is right clicked. The problem is, the actions I specify are not coming out correctly.
@Override
public Action[] getActions() {
return new Action[]{new A(), new B()};
}
I would expect that when I right click, my actions A and B would appear.
Instead I see
A
Minimize Window
B
How do I get minimize window either to not show up, or to show up in a different place?
This was a bizarre instance where A and B were ContextSensitive actions but in the XML layer they were declared as AlwaysEnabled. Once I fixed to put them as contextSensitive, this issue went away.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.