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

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

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

JTabbedPane.getUI介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

int tabNumber = getUI().tabForCoordinate(DraggableTabbedPane.this, e.getX(), e.getY());
 Rectangle bounds = getUI().getTabBounds(DraggableTabbedPane.this, tabNumber);
int tabNumber = getUI().tabForCoordinate(DraggableTabbedPane.this, e.getX(), 10);

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

@Override
public void setTabAreaInsets(JTabbedPane tabbedPane, Insets tabAreaInsets) {
  SubstanceTabbedPaneUI ui = (SubstanceTabbedPaneUI) tabbedPane.getUI();
  ui.setTabAreaInsets(tabAreaInsets);
}

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

@Override
public Rectangle getTabRectangle(JTabbedPane tabbedPane, int tabIndex) {
  SubstanceTabbedPaneUI ui = (SubstanceTabbedPaneUI) tabbedPane.getUI();
  return ui.getTabRectangle(tabIndex);
}

代码示例来源:origin: com.jidesoft/jide-oss

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BasicJideTabbedPaneUI ui = (BasicJideTabbedPaneUI) pane.getUI();
    ui.navigateSelectedTab(WEST);
  }
}

代码示例来源:origin: org.apache.poi/poi-examples

/** This method will display the popup if the mouseevent is a popup event
 *  and the event occurred over a tab
 */
protected void checkPopup(MouseEvent e) {
 if (e.isPopupTrigger()) {
  int tab = sheetPane.getUI().tabForCoordinate(sheetPane, e.getX(), e.getY());
  if (tab != -1) {
   popup.show(sheetPane, e.getX(), e.getY());
  }
 }
}

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

public void actionPerformed(ActionEvent e)
  {
    JTabbedPane pane= (JTabbedPane) e.getSource();
    TabbedPaneUI ui= (TabbedPaneUI) pane.getUI();
    ui.navigateSelectedTab(NORTH);
  }
};

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

public void actionPerformed(ActionEvent e)
  {
    JTabbedPane pane= (JTabbedPane) e.getSource();
    TabbedPaneUI ui= (TabbedPaneUI) pane.getUI();
    ui.requestMyFocusForVisibleComponent();
  }
};

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

@Override
public int getRolloverTabIndex(JTabbedPane tabbedPane) {
  SubstanceTabbedPaneUI ui = (SubstanceTabbedPaneUI) tabbedPane.getUI();
  return ui.getRolloverTabIndex();
}

代码示例来源:origin: com.jidesoft/jide-oss

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BasicJideTabbedPaneUI ui = (BasicJideTabbedPaneUI) pane.getUI();
    ui.navigateSelectedTab(PREVIOUS);
  }
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

private void maybeShowPopup(MouseEvent e, JPopupMenu popup)
{
 if (e.isPopupTrigger())
 {
   int tab = _tabbedExecutionsPanel.getUI().tabForCoordinate(_tabbedExecutionsPanel, e.getX(), e.getY());
   if (-1 != tab)
   {
    popup.show(e.getComponent(), e.getX(), e.getY());
   }
 }
}

代码示例来源:origin: com.jidesoft/jide-oss

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BasicJideTabbedPaneUI ui = (BasicJideTabbedPaneUI) pane.getUI();
    ui.navigateSelectedTab(NEXT);
  }
}

代码示例来源:origin: com.jidesoft/jide-oss

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BasicJideTabbedPaneUI ui = (BasicJideTabbedPaneUI) pane.getUI();
    ui.requestFocusForVisibleComponent();
  }
}

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

@Override
public void setTabAreaInsets(JTabbedPane tabbedPane, Insets tabAreaInsets) {
  SubstanceTabbedPaneUI ui = (SubstanceTabbedPaneUI) tabbedPane.getUI();
  ui.setTabAreaInsets(tabAreaInsets);
}

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

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BaseTabbedPaneUI ui = (BaseTabbedPaneUI) pane.getUI();
    ui.navigateSelectedTab(EAST);
  }
};

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

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BaseTabbedPaneUI ui = (BaseTabbedPaneUI) pane.getUI();
    ui.requestFocusForVisibleComponent();
  }
};

代码示例来源:origin: girtel/Net2Plan

@Override
  public void mouseClicked(MouseEvent e) {
    int tabNumber = reportContainer.getUI().tabForCoordinate(reportContainer, e.getX(), e.getY());
    if (tabNumber >= 0) {
      Rectangle rect = ((TabIcon) reportContainer.getIconAt(tabNumber)).getBounds();
      if (rect.contains(e.getX(), e.getY())) reportContainer.removeTabAt(tabNumber);
    }
  }
});

代码示例来源:origin: com.jidesoft/jide-oss

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BasicJideTabbedPaneUI ui = (BasicJideTabbedPaneUI) pane.getUI();
    int tabPlacement = pane.getTabPlacement();
    if (tabPlacement == TOP || tabPlacement == BOTTOM) {
      ui.navigateSelectedTab(WEST);
    }
    else {
      ui.navigateSelectedTab(NORTH);
    }
  }
}

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

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BaseTabbedPaneUI ui = (BaseTabbedPaneUI) pane.getUI();
    int tabPlacement = pane.getTabPlacement();
    if (tabPlacement == TOP || tabPlacement == BOTTOM) {
      ui.navigateSelectedTab(EAST);
    } else {
      ui.navigateSelectedTab(SOUTH);
    }
  }
};

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

public void actionPerformed(ActionEvent e) {
    JTabbedPane pane = (JTabbedPane) e.getSource();
    BaseTabbedPaneUI ui = (BaseTabbedPaneUI) pane.getUI();
    int tabPlacement = pane.getTabPlacement();
    if (tabPlacement == TOP || tabPlacement == BOTTOM) {
      ui.navigateSelectedTab(WEST);
    } else {
      ui.navigateSelectedTab(NORTH);
    }
  }
};

代码示例来源:origin: mucommander/mucommander

public static void customizeTabbedPaneUI(JTabbedPane tabbedPane) {
  TabbedPaneUI tabbedPaneUI = tabbedPane.getUI();
  
  if (tabbedPaneUI instanceof AquaTabbedPaneUI)
    tabbedPane.setUI(new CompactAquaTabbedPaneUI());
  else if (tabbedPaneUI instanceof AquaTabbedPaneContrastUI)
    tabbedPane.setUI(new CompactAquaTabbedPaneContrastUI());
}

相关文章

JTabbedPane类方法