本文整理了Java中javax.swing.JTabbedPane.getInsets()
方法的一些代码示例,展示了JTabbedPane.getInsets()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.getInsets()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:getInsets
暂无
代码示例来源:origin: khuxtable/seaglass
Insets contentInsets = getContentBorderInsets(tabPlacement);
Rectangle bounds = tabPane.getBounds();
Insets insets = tabPane.getInsets();
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) {
// super.paintContentBorder(g, tabPlacement, selectedIndex);
int width = tabPane.getWidth();
int height = tabPane.getHeight();
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
int x = insets.left;
int y = insets.top;
int w = width - insets.right - insets.left;
int h = height - insets.top - insets.bottom;
y += calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight);
y -= tabAreaInsets.bottom;
h -= (y - insets.top);
if ( tabPane.getTabCount() > 0) {
// Fill region behind content area
g.setColor(ColorController.COR_PRINCIPAL);
g.fillRect(x,y,w,h);
}
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) {
// super.paintContentBorder(g, tabPlacement, selectedIndex);
int width = tabPane.getWidth();
int height = tabPane.getHeight();
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
int x = insets.left;
int y = insets.top;
int w = width - insets.right - insets.left;
int h = height - insets.top - insets.bottom;
y += calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight);
y -= tabAreaInsets.bottom;
h -= (y - insets.top);
if ( tabPane.getTabCount() > 0) {
// Fill region behind content area
g.setColor(ColorController.COR_CONSOLE);
g.fillRect(x,y,w,h);
}
}
代码示例来源:origin: com.jtattoo/JTattoo
protected Dimension calculateSize(boolean minimum) {
int tabPlacement = tabPane.getTabPlacement();
Insets insets = tabPane.getInsets();
Insets contentInsets = getContentBorderInsets(tabPlacement);
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
final Insets insets = tabPane.getInsets ();
if ( tabbedPaneStyle.equals ( TabbedPaneStyle.attached ) && isSelected )
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected Dimension calculateSize(boolean minimum)
Insets insets= tabPane.getInsets();
Insets contentInsets= getContentBorderInsets(tabPlacement);
Insets tabAreaInsets= getTabAreaInsets(tabPlacement);
代码示例来源:origin: com.fifesoft.rtext/fife.common
int fontHeight = metrics.getHeight();
Dimension size = tabPane.getSize();
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
代码示例来源:origin: com.fifesoft.rtext/fife.common
Insets insets = tabPane.getInsets();
int selectedIndex = tabPane.getSelectedIndex();
Component visibleComponent = getVisibleComponent();
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
Insets insets= tabPane.getInsets();
Insets tabAreaInsets= getTabAreaInsets(tabPlacement);
int fontHeight= metrics.getHeight();
代码示例来源:origin: com.jtattoo/JTattoo
protected void calculateTabRects(int tabPlacement, int tabCount) {
FontMetrics fm = getFontMetrics();
Dimension size = tabPane.getSize();
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
int fontHeight = fm.getHeight();
代码示例来源:origin: khuxtable/seaglass
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
Rectangle bounds = tabPane.getBounds();
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
Insets insets= tabPane.getInsets();
代码示例来源:origin: com.github.insubstantial/substance
Insets insets = tabPane.getInsets();
代码示例来源:origin: org.java.net.substance/substance
Insets insets = tabPane.getInsets();
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
int width = tabPane.getWidth();
int height = tabPane.getHeight();
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
代码示例来源:origin: khuxtable/seaglass
int width = tabPane.getWidth();
int height = tabPane.getHeight();
Insets insets = tabPane.getInsets();
代码示例来源:origin: net.java.dev.swing-layout/swing-layout
private int getTabbedPaneBaseline(JTabbedPane tp, int height) {
if (tp.getTabCount() > 0) {
Insets insets = tp.getInsets();
Insets contentBorderInsets = UIManager.getInsets(
"TabbedPane.contentBorderInsets");
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
public Shape getContentClip ()
{
Shape clip = null;
final int tabPlacement = tabPane.getTabPlacement ();
final int tabAreaLength = getTabAreaLength ( tabPlacement );
final Insets insets = tabPane.getInsets ();
if ( tabPlacement == JTabbedPane.TOP )
{
clip = new RoundRectangle2D.Double ( insets.left, insets.top + tabAreaLength, tabPane.getWidth () - insets.left - insets.right,
tabPane.getHeight () - insets.top - tabAreaLength - insets.bottom, round * 2, round * 2 );
}
else if ( tabPlacement == JTabbedPane.BOTTOM )
{
clip = new RoundRectangle2D.Double ( insets.left, insets.top, tabPane.getWidth () - insets.left - insets.right,
tabPane.getHeight () - insets.top - tabAreaLength - insets.bottom, round * 2, round * 2 );
}
else if ( tabPlacement == JTabbedPane.LEFT )
{
clip = new RoundRectangle2D.Double ( insets.left + tabAreaLength, insets.top,
tabPane.getWidth () - insets.left - tabAreaLength - insets.right, tabPane.getHeight () - insets.top - insets.bottom,
round * 2, round * 2 );
}
else if ( tabPlacement == JTabbedPane.RIGHT )
{
clip = new RoundRectangle2D.Double ( insets.left, insets.top, tabPane.getWidth () - insets.left - tabAreaLength - insets.right,
tabPane.getHeight () - insets.top - insets.bottom, round * 2, round * 2 );
}
return clip;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf
int width = tabPane.getWidth();
int height = tabPane.getHeight();
Insets insets = tabPane.getInsets();
代码示例来源:origin: net.java.dev.swing-layout/swing-layout
return getAquaTabbedPaneBaseline(tp, height);
Insets insets = tp.getInsets();
Insets contentBorderInsets = UIManager.getInsets(
"TabbedPane.contentBorderInsets");
内容来源于网络,如有侵权,请联系作者删除!