AbstractMenuSection from menu-api allows you to specify an action with createAction() - this is used in the contextual menues to add section headers using the ShadedLabel class. (The actual actionPerformed() method is never called - but the text label is picked up)
However - the current implementation always uses the ShadedLabel.GREEN colour - so we (Alex+Stian) extended the MenuManagerImpl so that if the Action (as in java.awt.Action) has a property "sectionColor" (note US spelling) has a Color instance assigned to it - that would be used instead of ShadedLabel.GREEN. Oh - and preferably you would want to use the ColourManager.getPreferredColour() for finding that colour. BTW - ShadedLabel doesn't support Action's, only the label as a String, and so the Icon is currently ignored - this could easily be supported and also do a label.setIcon() inside ShadedLabel) -- Stian Soiland-Reyes, myGrid team School of Computer Science The University of Manchester ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ taverna-hackers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/taverna-hackers Developers Guide: http://www.mygrid.org.uk/usermanual1.7/dev_guide.html FAQ: http://www.mygrid.org.uk/wiki/Mygrid/TavernaFaq
