Package javax.swing

Examples of javax.swing.JPanel.validate()


        }

  if (displayCount == 0)
      return;

  panel.validate();
  panel.repaint();

  ViewScreen screen = new ViewScreen(panel);
        screen.setTitle(title);
  screen.pack();
View Full Code Here


      panel.setSize(MAX_SIZE, MAX_SIZE);
      panel.setLayout(new FlowLayout());
      panel.add(legendPanel);
    }
    panel.addNotify();
    panel.validate();
  }

  protected ImageIcon createImageIcon(String path) {
    java.net.URL imgURL = getClass().getResource(path);
    if (imgURL != null) {
View Full Code Here

  public boolean removeChild(Component child) {
    JPanel jpanel = (JPanel) getWidget();
    LayoutManager layout = jpanel.getLayout();
    if (layout == null) {
      jpanel.remove(child);
      jpanel.validate();
      return true;
    } else {
      LayoutAdapter layoutAdapter = getLayoutAdapter();
      boolean success = layoutAdapter.removeChild(child);
      if (success) {
View Full Code Here

      return true;
    } else {
      LayoutAdapter layoutAdapter = getLayoutAdapter();
      boolean success = layoutAdapter.removeChild(child);
      if (success) {
        jpanel.validate();
        layoutAdapter.setContainer(jpanel);
        return true;
      } else
        return false;
    }
View Full Code Here

    }
    JPanel jpanel = (JPanel) adapter.getWidget();
    jpanel.setLayout(null);
    adapter.setLayoutAdapter(null);
    adapter.doLayout();
    jpanel.validate();
    return Status.OK_STATUS;
  }

  @Override
  public IStatus redo(IProgressMonitor monitor, IAdaptable info)
View Full Code Here

    for (Pair pair : constraints) {
      adapter.addChildByConstraints(pair.child, pair.constraints);
    }
    adapter.doLayout();
    adapter.setLayoutAdapter(null);
    jpanel.validate();
    adapter.setDirty(true);
    adapter.addNotify();
    return Status.OK_STATUS;
  }
View Full Code Here

    JPanel jpanel = (JPanel) jpaneladapter.getWidget();
    LayoutAdapter adapter = LayoutAdapter.createLayoutAdapter(config);
    adapter.initConainerLayout(jpanel, monitor);
    jpaneladapter.setLayoutAdapter(null);
    jpaneladapter.doLayout();
    jpanel.validate();
    jpaneladapter.setDirty(true);
    jpaneladapter.addNotify();
    return Status.OK_STATUS;
  }
View Full Code Here

    for (Pair pair : constraints) {
      jpaneladapter.addChildByConstraints(pair.child, pair.constraints);
    }
    jpaneladapter.doLayout();
    jpaneladapter.setLayoutAdapter(null);
    jpanel.validate();
    jpaneladapter.setDirty(true);
    jpaneladapter.addNotify();
    return Status.OK_STATUS;
  }
View Full Code Here

                              }
                                     
                          }
                      });
                      getGalerie().add (panImage);
                      panImage.validate ();
                      getGalerie().revalidate ();
                      int x = 0, y = getGalerie().getHeight ()-300, w = getGalerie().getWidth (), h = 300;
                      Rectangle r = new Rectangle(x,y,w,h);
                      getGalerie().scrollRectToVisible (r);
                }
View Full Code Here

    catch (Exception e)
    {
      e.printStackTrace();
    } // catch (Exception)

    contents.validate();
    JScrollPane scroll = new JScrollPane();
    this.setContentPane(scroll);
    this.validate();
    scroll.validate();
    scroll.setVisible(true);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.