微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java.awt.event.ContainerAdapter的实例源码

项目:AgentWorkbench    文件BasicGraphGui.java   
/**
 * This method initializes this
 */
private void initialize() {

    // --- Set appearance -----------------------------
    this.setVisible(true);
    this.setSize(300,300);
    this.setLayout(new BorderLayout());
    this.setDoubleBuffered(true);

    // --- Add components -----------------------------
    this.add(this.getJPanelToolBars(),BorderLayout.WEST);
    this.add(this.getGraphZoomScrollPane(),BorderLayout.CENTER);

    this.addContainerListener(new ContainerAdapter() {
        boolean doneAdded = false;
        @Override
        public void componentAdded(ContainerEvent ce) {
            if (doneAdded==false) {
                validate();
                zoomSetinitialScalingAndMovement(getVisualizationViewer());
                doneAdded=true;
            }
        }
    });
}
项目:swingx    文件JXTaskPaneContainer.java   
/**
 * Creates a new empty task pane.
 */
public JXTaskPaneContainer() {
    super(null);
    updateUI();

    addContainerListener(new ContainerAdapter() {
        @Override
        public void componentRemoved(ContainerEvent e) {
            repaint();
        }
    });
    setScrollableHeightHint(ScrollableSizeHint.PREFERRED_STRETCH);
}
项目:aibench-project    文件JXTaskPaneContainer.java   
/**
 * Creates a new empty taskpane.
 */
public JXTaskPaneContainer() {
    super(null);
  updateUI();

  addContainerListener(new ContainerAdapter() {
      public void componentRemoved(ContainerEvent e) {
          repaint();
      }
  });
}
项目:viskit    文件JImageListView.java   
/**
 * Ensures {@link #copyUiStatetoSubComponent(java.awt.Component) } will
 * be called for any child component added to this component in the
 * future. Called once by the default constructor of JImageListView.
 * Subclasses may (rarely) override,e.g. with an empty implementation
 * if they want to inhibit this behavIoUr for some (strange) reason.
 */
protected void ensureUiStateIscopiedForAddedComponents() {
    this.addContainerListener(new ContainerAdapter() {
        @Override
        public void componentAdded(ContainerEvent e) {
            JImageListView.this.copyUiStatetoSubComponent(e.getChild());
        }
    });
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。