1 package org.catacomb.druid.gui.edit;
2
3 import org.catacomb.druid.event.LabelActor;
4 import org.catacomb.druid.swing.DSlider;
5
6 import java.awt.Color;
7
8
9
10 public class DruSlider extends DruGCPanel implements LabelActor {
11
12 static final long serialVersionUID = 1001;
13
14 DSlider dSlider;
15
16
17
18 public DruSlider(int npt, String action) {
19 super();
20
21 if (action != null && action.length() > 0) {
22 methodName = action;
23 } else {
24 methodName = "sliderMoved";
25 }
26 dSlider = new DSlider(npt);
27
28 addSingleDComponent(dSlider);
29 dSlider.setLabelActor(this);
30 dSlider.setMouseActor(this);
31 }
32
33
34 public void setBg(Color c) {
35 dSlider.setBg(c);
36 super.setBg(c);
37 }
38
39
40 public void setNFrame(int nfr) {
41 dSlider.setNPoint(nfr);
42 }
43
44 public void showValue(int ipos) {
45 dSlider.showValue(ipos);
46 }
47
48
49 public void setValues(String[] sa) {
50 dSlider.setValues(sa);
51 }
52
53
54 public int getValue() {
55 return dSlider.getValue();
56 }
57
58
59 public void labelAction(String s, boolean b) {
60 action();
61 }
62
63
64 public void pointShown(int ifr, String desc) {
65 dSlider.pointShown(ifr, desc);
66 }
67
68 }