1 package com.explosion.expf.menusandtools.menu.segmented;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import java.awt.Component;
24
25 import com.explosion.expf.menusandtools.menu.InvalidOrUnknownSegmentException;
26
27 /***
28 * Title: Description:
29 *
30 * @author Stephen Cowx
31 */
32
33 public class ExpMenuSegment
34 {
35
36 public static final int ALWAYS_FIRST_SEGMENT = 0;
37 public static final int ALWAYS_LAST_SEGMENT = 1;
38 public static final int ANY_POSITION = 2;
39
40 private ExpSegmentedMenu menu;
41
42 public ExpMenuSegment(ExpSegmentedMenu menu)
43 {
44 this.menu = menu;
45 }
46
47 /***
48 * You can use this method or the ExpSegmentedMenu.addElementToSegment method. the effect should be the same
49 * @param element
50 * @throws InvalidOrUnknownSegmentException
51 */
52 public void addElement(Component element) throws InvalidOrUnknownSegmentException
53 {
54 menu.addElementToSegment(this, element);
55 }
56
57 }