/**
  * Handle disposal of the web browser after auth complete
  *
  * @param webBrowser
  */
 public void onDisposeLogin(final Form backForm, final WebBrowser webBrowser) {
   webBrowser.stop();
   Container parent = webBrowser.getParent();
   parent.removeComponent(webBrowser);
   parent.revalidate();
   if (backForm != null) {
     backForm.showBack();
   }
 }
Пример #2
0
 public void paint(Graphics g) {
   Component cmp =
       renderer.getCellRendererComponent(
           ContainerList.this, model, model.getItemAt(offset), offset, hasFocus());
   cmp.setX(getX());
   cmp.setY(getY());
   cmp.setWidth(getWidth());
   cmp.setHeight(getHeight());
   if (cmp instanceof Container) {
     ((Container) cmp).revalidate();
   }
   cmp.setFocus(hasFocus());
   cmp.paintComponent(g);
 }
Пример #3
0
 public Dimension calcPreferredSize() {
   Component c =
       renderer.getCellRendererComponent(
           ContainerList.this, model, model.getItemAt(offset), offset, hasFocus());
   if (getWidth() <= 0) {
     c.setWidth(Display.getInstance().getDisplayWidth());
     c.setHeight(Display.getInstance().getDisplayHeight());
   } else {
     c.setWidth(getWidth());
     c.setHeight(getHeight());
   }
   if (c instanceof Container) {
     ((Container) c).revalidate();
   }
   Dimension d = c.getPreferredSize();
   return d;
 }