Customizing predefined interactor buttons on the toolbar

Article ID: 2134
Last updated: 28 May, 2018
Article ID: 2134
Last updated: 28 May, 2018
Revision: 3
Views: 657
Posted: 04 Aug, 2003
by Dean J.
Updated: 28 May, 2018
by Gargani A.

Question

How do I customize predefined interactor buttons on the toolbar?

Answer

Toolbar is an object of java.swing.JToolBar. You can access a predefined button on the toolbar through its index, and add customized actions to it.
For example:

IlpNetworkView view = ...
Component button = view.getToolBar().getComponentAtIndex(0);
button.addMouseListener( new MouseAdapter(){
public void mouseClicked(MouseEvent e){
...
}
});

The predefined buttons are tightly integrated with their associated actions. So if you want to replace their default behavior with your customization, it is recommended that you replace the predefined buttons themselves with other instances of IlpNetworkInteractorButton.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2134
Last updated: 28 May, 2018
Revision: 3
Views: 657
Posted: 04 Aug, 2003 by Dean J.
Updated: 28 May, 2018 by Gargani A.
Also read

Also listed in


Others in this category