public void newchild(Widget w) { if (w instanceof Channel) { Channel chan = (Channel) w; select(chan); chansel.add(chan); if (!expanded) chan.hide(); } }
public void select(Channel chan) { Channel prev = sel; sel = chan; if (expanded) { if (prev != null) prev.hide(); sel.show(); resize(sz); } }
private void contract() { resize(new Coord(sz.x, 50)); setcanfocus(false); if (sel != null) sel.hide(); chansel.hide(); expanded = false; }
private void expand() { resize(new Coord(sz.x, 100)); setcanfocus(true); if (sel != null) sel.show(); chansel.show(); expanded = true; }
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)); } }
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)); }
private Notification(Channel chan, Channel.Message msg) { this.chan = chan; this.msg = msg; this.chnm = chansel.nf.render(chan.name(), Color.WHITE); }