Re: Working with Tabs
Posted: Fri Aug 28, 2009 10:19 am
Thanks for your reply jmarie.
The OME community
https://www.openmicroscopy.org/community/
https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=39
void createActions(){
....
actionsMap.put(CREATE_PROJECT., new BrowserCreateProjectAction(model));
}
public class BrowserCreateProjectAction
extends BrowserAction
{
/** Description of the action. */
private static final String DESCRIPTION = "Create a project";
/**
* Creates a new instance.
*
* @param model Reference to the Model. Mustn't be <code>null</code>.
*/
public BrowserCreateProjectAction(Browser model)
{
super(model);
setEnabled(true);
putValue(Action.SHORT_DESCRIPTION,
UIUtilities.formatToolTipText(DESCRIPTION));
IconManager im = IconManager.getInstance();
putValue(Action.SMALL_ICON, im.getIcon(IconManager.CREATE)); //or other icons
}
/**
* Displays the list of supported file formats.
* @see java.awt.event.ActionListener#actionPerformed(ActionEvent)
*/
public void actionPerformed(ActionEvent e)
{
model.createProject() // code you will have to be implement in Browser
}
}