01: package vicazh.hyperpool.stream;
02:
03: /**
04: * The graphic value selector
05: *
06: * @author Victor Zhigunov
07: * @version 0.4.0
08: */
09: public class IValSelector extends IListSelector implements
10: ValSelectorMBean {
11: private ISelectorListModel valModel;
12: protected ISelectorModel model;
13:
14: /**
15: * @param name
16: * selector name
17: * @param valModel
18: * combo box model for values
19: * @param model
20: * selector table model
21: */
22: public IValSelector(String name, ISelectorListModel valModel,
23: ISelectorModel model) {
24: super (ValSelectorMBean.class, name);
25: this .valModel = valModel;
26: this .model = model;
27: }
28:
29: public void added(int index) {
30: valModel.insert(index);
31: }
32:
33: public void removed(int index) {
34: valModel.remove(index);
35: }
36:
37: protected void otherNotification(String type, Object value) {
38: if (type.equals(ListSelectorMBean.LIST))
39: model.fireTableDataChanged();
40: }
41:
42: }
|