javax.swing.JTabbedPane.isValid()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中javax.swing.JTabbedPane.isValid()方法的一些代码示例,展示了JTabbedPane.isValid()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.isValid()方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:isValid

JTabbedPane.isValid介绍

暂无

代码示例

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

private void ensureCurrentLayout()
{
  if (!tabPane.isValid())
  {
    tabPane.validate();
  }
  /* If tabPane doesn't have a peer yet, the validate() call will
   * silently fail.  We handle that by forcing a layout if tabPane
   * is still invalid.  See bug 4237677.
   */
  if (!tabPane.isValid())
  {
    TabbedPaneLayout layout= (TabbedPaneLayout) tabPane.getLayout();
    layout.calculateLayoutInfo();
  }
}

代码示例来源:origin: khuxtable/seaglass

/**
 * Make sure we have laid out the pane with the current layout.
 */
private void ensureCurrentLayout() {
  if (!tabPane.isValid()) {
    tabPane.validate();
  }
  /*
   * If tabPane doesn't have a peer yet, the validate() call will silently
   * fail. We handle that by forcing a layout if tabPane is still invalid.
   * See bug 4237677.
   */
  if (!tabPane.isValid()) {
    TabbedPaneLayout layout = (TabbedPaneLayout) tabPane.getLayout();
    layout.calculateLayoutInfo();
  }
}

代码示例来源:origin: com.github.insubstantial/substance

/**
 * Ensures the current layout.
 */
protected void ensureCurrentLayout() {
  if (!this.tabPane.isValid()) {
    this.tabPane.validate();
  }
  /*
   * If tabPane doesn't have a peer yet, the validate() call will silently
   * fail. We handle that by forcing a layout if tabPane is still invalid.
   * See bug 4237677.
   */
  if (!this.tabPane.isValid()) {
    LayoutManager lm = this.tabPane.getLayout();
    if (lm instanceof BasicTabbedPaneUI.TabbedPaneLayout) {
      BasicTabbedPaneUI.TabbedPaneLayout layout = (BasicTabbedPaneUI.TabbedPaneLayout) lm;
      layout.calculateLayoutInfo();
    }
  }
}

代码示例来源:origin: org.java.net.substance/substance

/**
 * Ensures the current layout.
 */
protected void ensureCurrentLayout() {
  if (!this.tabPane.isValid()) {
    this.tabPane.validate();
  }
  /*
   * If tabPane doesn't have a peer yet, the validate() call will silently
   * fail. We handle that by forcing a layout if tabPane is still invalid.
   * See bug 4237677.
   */
  if (!this.tabPane.isValid()) {
    LayoutManager lm = this.tabPane.getLayout();
    if (lm instanceof BasicTabbedPaneUI.TabbedPaneLayout) {
      BasicTabbedPaneUI.TabbedPaneLayout layout = (BasicTabbedPaneUI.TabbedPaneLayout) lm;
      layout.calculateLayoutInfo();
    }
  }
}

相关文章

JTabbedPane类方法