Beispiel #1
0
 public void newchild(Widget w) {
   if (w instanceof Channel) {
     Channel chan = (Channel) w;
     select(chan);
     chansel.add(chan);
     if (!expanded) chan.hide();
   }
 }
Beispiel #2
0
 public void select(Channel chan) {
   Channel prev = sel;
   sel = chan;
   if (expanded) {
     if (prev != null) prev.hide();
     sel.show();
     resize(sz);
   }
 }
Beispiel #3
0
 private void contract() {
   resize(new Coord(sz.x, 50));
   setcanfocus(false);
   if (sel != null) sel.hide();
   chansel.hide();
   expanded = false;
 }
Beispiel #4
0
 private void expand() {
   resize(new Coord(sz.x, 100));
   setcanfocus(true);
   if (sel != null) sel.show();
   chansel.show();
   expanded = true;
 }
Beispiel #5
0
 public void resize(Coord sz) {
   super.resize(sz);
   if (in != null) {
     in.c = new Coord(0, this.sz.y - 20);
     in.resize(new Coord(this.sz.x, 20));
   }
 }
Beispiel #6
0
 public void resize(Coord sz) {
   super.resize(sz);
   this.c = base.add(0, -this.sz.y);
   chansel.resize(new Coord(selw, this.sz.y));
   if (sel != null) sel.resize(new Coord(this.sz.x - selw, this.sz.y));
 }
Beispiel #7
0
 private Notification(Channel chan, Channel.Message msg) {
   this.chan = chan;
   this.msg = msg;
   this.chnm = chansel.nf.render(chan.name(), Color.WHITE);
 }