/**
* 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;
}
}
});
}
java类java.awt.event.ContainerAdapter的实例源码
BasicGraphGui.java 文件源码
项目:AgentWorkbench
阅读 33
收藏 0
点赞 0
评论 0
JXTaskPaneContainer.java 文件源码
项目:swingx
阅读 26
收藏 0
点赞 0
评论 0
/**
* 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);
}
JXTaskPaneContainer.java 文件源码
项目:aibench-project
阅读 27
收藏 0
点赞 0
评论 0
/**
* Creates a new empty taskpane.
*/
public JXTaskPaneContainer() {
super(null);
updateUI();
addContainerListener(new ContainerAdapter() {
public void componentRemoved(ContainerEvent e) {
repaint();
}
});
}
JImageListView.java 文件源码
项目:viskit
阅读 24
收藏 0
点赞 0
评论 0
/**
* 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());
}
});
}