本文整理了Java中javax.swing.JTabbedPane.addContainerListener()
方法的一些代码示例,展示了JTabbedPane.addContainerListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.addContainerListener()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:addContainerListener
暂无
代码示例来源:origin: otros-systems/otroslogviewer
private void addEmptyViewListener() {
logsTabbedPane.addContainerListener(new ContainerListener() {
@Override
public void componentRemoved(ContainerEvent e) {
setCard();
}
@Override
public void componentAdded(ContainerEvent e) {
setCard();
}
public void setCard() {
int tabCount = logsTabbedPane.getTabCount();
if (tabCount > 0) {
cardLayout.show(cardLayoutPanel, CARD_LAYOUT_LOGS_TABLE);
} else {
cardLayout.show(cardLayoutPanel, CARD_LAYOUT_EMPTY);
}
}
});
}
代码示例来源:origin: JetBrains/jediterm
@Override
public void addChangeListener(final TabChangeListener listener) {
myTabbedPane.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
listener.selectionChanged();
}
});
myTabbedPane.addContainerListener(new ContainerListener() {
@Override
public void componentAdded(ContainerEvent e) {
}
@Override
public void componentRemoved(ContainerEvent e) {
if (e.getSource() == myTabbedPane) {
listener.tabRemoved();
}
}
});
}
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
this.jcomp.addContainerListener(this.containerListener);
代码示例来源:origin: protegeproject/protege
private void createHolder() {
// We display the views in a customised tab pane.
// This means that if there are multiple views in
// a particular area they get stacked and are accessible
// to the user.
tabbedHolder = new ViewTabbedPane();
tabbedHolder.setTabPlacement(SwingConstants.BOTTOM);
// Set the minimum size of the holder so that the
// split panes can be dragged around easily. We don't
// want to set the size to zero, because this allows the
// contents of the split pane to be completely hidden,
// which could be confusing for the user.
// tabbedHolder.setMinimumSize(new Dimension(10, 10));
tabbedHolder.addContainerListener(new ContainerListener() {
public void componentAdded(ContainerEvent e) {
if (tabbedHolder.getComponentCount() == 1) {
ViewHolder.this.add(tabbedHolder);
}
}
public void componentRemoved(ContainerEvent e) {
if (tabbedHolder.getComponentCount() == 0) {
ViewHolder.this.remove(tabbedHolder);
}
}
});
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application
private void createHolder() {
// We display the views in a customised tab pane.
// This means that if there are multiple views in
// a particular area they get stacked and are accessible
// to the user.
tabbedHolder = new ViewTabbedPane();
tabbedHolder.setTabPlacement(JTabbedPane.BOTTOM);
// Set the minimum size of the holder so that the
// split panes can be dragged around easily. We don't
// want to set the size to zero, because this allows the
// contents of the split pane to be completely hidden,
// which could be confusing for the user.
// tabbedHolder.setMinimumSize(new Dimension(10, 10));
tabbedHolder.addContainerListener(new ContainerListener() {
public void componentAdded(ContainerEvent e) {
if (tabbedHolder.getComponentCount() == 1) {
ViewHolder.this.add(tabbedHolder);
}
}
public void componentRemoved(ContainerEvent e) {
if (tabbedHolder.getComponentCount() == 0) {
ViewHolder.this.remove(tabbedHolder);
}
}
});
}
代码示例来源:origin: org.protege/protege-editor-core-application
private void createHolder() {
// We display the views in a customised tab pane.
// This means that if there are multiple views in
// a particular area they get stacked and are accessible
// to the user.
tabbedHolder = new ViewTabbedPane();
tabbedHolder.setTabPlacement(JTabbedPane.BOTTOM);
// Set the minimum size of the holder so that the
// split panes can be dragged around easily. We don't
// want to set the size to zero, because this allows the
// contents of the split pane to be completely hidden,
// which could be confusing for the user.
// tabbedHolder.setMinimumSize(new Dimension(10, 10));
tabbedHolder.addContainerListener(new ContainerListener() {
public void componentAdded(ContainerEvent e) {
if (tabbedHolder.getComponentCount() == 1) {
ViewHolder.this.add(tabbedHolder);
}
}
public void componentRemoved(ContainerEvent e) {
if (tabbedHolder.getComponentCount() == 0) {
ViewHolder.this.remove(tabbedHolder);
}
}
});
}
代码示例来源:origin: girtel/Net2Plan
reportContainer.addContainerListener(new ContainerListener() {
@Override
public void componentAdded(ContainerEvent e) {
代码示例来源:origin: edu.stanford.protege/org.coode.owlviz
tabbedPane.addContainerListener(new ContainerListener() {
public void componentAdded(ContainerEvent e) {
代码示例来源:origin: girtel/Net2Plan
tabbedPane.addContainerListener(new ContainerListener() {
@Override
public void componentRemoved(ContainerEvent e) {
代码示例来源:origin: org.apache.airavata/airavata-xbaya-gui
graphTabbedPane.addContainerListener(new ContainerListener() {
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
tabPane.addContainerListener(containerListener);
if (tabPane.getTabCount() > 0)
代码示例来源:origin: com.github.insubstantial/substance
this.tabPane.addContainerListener(this.substanceContainerListener);
代码示例来源:origin: org.java.net.substance/substance
this.tabPane.addContainerListener(this.substanceContainerListener);
代码示例来源:origin: com.jtattoo/JTattoo
tabPane.addContainerListener(containerListener);
if (tabPane.getTabCount() > 0) {
htmlViews = createHTMLViewList();
内容来源于网络,如有侵权,请联系作者删除!