예제 #1
0
 public Channel(Coord c, Coord sz, Widget parent) {
   super(c, sz, parent);
   sb = new Scrollbar(new Coord(sz.x, 0), ih(), this, 0, -ih());
   cbtn = new IButton(Coord.z, this, cbtni[0], cbtni[1], cbtni[2]);
   cbtn.recthit = true;
   cbtn.c = new Coord(sz.x - cbtn.sz.x - sb.sz.x - 3, 0);
 }
예제 #2
0
 public void resize(Coord sz) {
   super.resize(sz);
   if (sb != null) {
     sb.resize(ih());
     sb.move(new Coord(sz.x, 0));
     int y = 0;
     for (Message m : msgs) y += m.sz().y;
     boolean b = sb.val >= sb.max;
     sb.max = y - ih();
     if (b) sb.val = sb.max;
   }
   if (cbtn != null) cbtn.c = new Coord(sz.x - cbtn.sz.x - sb.sz.x - 3, 0);
 }
예제 #3
0
 public Window(Coord c, Coord sz, Widget parent, String cap) {
   super(c, new Coord(0, 0), parent);
   if (cap != null) {
     this.cap = cf.render(cap);
     name = cap;
   } else {
     this.cap = null;
     name = null;
   }
   resize(sz);
   setfocustab(true);
   parent.setfocus(this);
   cbtn = new IButton(Coord.z, this, cbtni[0], cbtni[1], cbtni[2]);
   cbtn.recthit = true;
   addtwdg(cbtn);
   loadOpts();
 }