| Home >> All >> javax >> ide >> menu >> [ spi Javadoc ] |
Source code: javax/ide/menu/spi/Section.java
1 package javax.ide.menu.spi; 2 3 import java.util.List; 4 5 /** 6 * A section is a collection of Items and Menus. 7 */ 8 public final class Section extends Positionable 9 { 10 private final PositionMap _items = new PositionMap(); 11 12 public Section( String id ) 13 { 14 super( id ); 15 } 16 17 /** 18 * Get the content of this section. The items in the list may be instances 19 * of either Item or Menu. 20 * 21 * @return the items in this section. 22 */ 23 public List getContent() 24 { 25 return _items.getSortedItems(); 26 } 27 28 public Positionable getItem( String id ) 29 { 30 return _items.get( id ); 31 } 32 33 void addItem( Positionable item ) 34 { 35 _items.add( item ); 36 } 37 38 }