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

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

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

JTabbedPane.getLayout介绍

暂无

代码示例

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

private boolean scrollableTabLayoutEnabled()
{
  return (tabPane.getLayout() instanceof TabbedPaneScrollLayout);
}

代码示例来源:origin: com.jtattoo/JTattoo

protected boolean scrollableTabLayoutEnabled() {
  return (tabPane.getLayout() instanceof TabbedPaneScrollLayout);
}

代码示例来源:origin: com.jtattoo/JTattoo

private void ensureCurrentLayout() {
  // TabPane maybe still invalid. See bug 4237677.
  ((TabbedPaneLayout) tabPane.getLayout()).calculateLayoutInfo();
}

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

tempG.dispose();
} else {
  if (tabPane.getLayout().getClass() == TabbedPaneLayout.class) {
    super.paintTab(g, tabPlacement, rects, tabIndex, iconRect,
        textRect);

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

tempG.dispose();
} else {
  if (tabPane.getLayout().getClass() == TabbedPaneLayout.class) {
    super.paintTab(g, tabPlacement, rects, tabIndex, iconRect,
        textRect);

代码示例来源: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: 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: 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();
    }
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void componentAdded(ContainerEvent e) {
  JTabbedPane tp = (JTabbedPane) e.getContainer();
  TabbedPaneLayout layout = (TabbedPaneLayout) tp.getLayout();
  layout.layoutContainer(tp);
  Component child = e.getChild();
  if (child instanceof UIResource) {
    return;
  }
  int index = tp.indexOfComponent(child);
  String title = tp.getTitleAt(index);
  boolean isHTML = BasicHTML.isHTMLString(title);
  if (isHTML) {
    if (htmlViews == null) {
      // Initialize vector
      htmlViews = createHTMLViewList();
    } else {
      // Vector already exists
      View v = BasicHTML.createHTMLView(tp, title);
      htmlViews.add(index, v);
    }
  } else {
    // Not HTML
    if (htmlViews != null) {
      // Add placeholder
      htmlViews.add(index, null);
    } // else nada!
  }
}

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

if (tabPane.getLayout().getClass() == TabbedPaneLayout.class) {
  paintTabArea(g, tabPlacement, selectedIndex);

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

if (tabPane.getLayout().getClass() == TabbedPaneLayout.class) {
  paintTabArea(g, tabPlacement, selectedIndex);

相关文章

JTabbedPane类方法