当前位置: 首页>>代码示例>>Java>>正文


Java ContainerAdapter类代码示例

本文整理汇总了Java中java.awt.event.ContainerAdapter的典型用法代码示例。如果您正苦于以下问题:Java ContainerAdapter类的具体用法?Java ContainerAdapter怎么用?Java ContainerAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ContainerAdapter类属于java.awt.event包,在下文中一共展示了ContainerAdapter类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import java.awt.event.ContainerAdapter; //导入依赖的package包/类
/**
 * 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;
			}
		}
	});
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:28,代码来源:BasicGraphGui.java

示例2: JXTaskPaneContainer

import java.awt.event.ContainerAdapter; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:16,代码来源:JXTaskPaneContainer.java

示例3: JXTaskPaneContainer

import java.awt.event.ContainerAdapter; //导入依赖的package包/类
/**
 * Creates a new empty taskpane.
 */
public JXTaskPaneContainer() {
    super(null);
  updateUI();
  
  addContainerListener(new ContainerAdapter() {
      public void componentRemoved(ContainerEvent e) {
          repaint();
      }
  });
}
 
开发者ID:sing-group,项目名称:aibench-project,代码行数:14,代码来源:JXTaskPaneContainer.java

示例4: ensureUiStateIsCopiedForAddedComponents

import java.awt.event.ContainerAdapter; //导入依赖的package包/类
/**
 * 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());
        }
    });
}
 
开发者ID:Sofd,项目名称:viskit,代码行数:16,代码来源:JImageListView.java


注:本文中的java.awt.event.ContainerAdapter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。