本文整理汇总了Java中com.sun.java.swing.plaf.gtk.GTKConstants.PositionType.BOTTOM属性的典型用法代码示例。如果您正苦于以下问题:Java PositionType.BOTTOM属性的具体用法?Java PositionType.BOTTOM怎么用?Java PositionType.BOTTOM使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.java.swing.plaf.gtk.GTKConstants.PositionType
的用法示例。
在下文中一共展示了PositionType.BOTTOM属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: paintTabbedPaneContentBackground
public void paintTabbedPaneContentBackground(SynthContext context,
Graphics g, int x, int y, int w, int h) {
JTabbedPane pane = (JTabbedPane)context.getComponent();
int selectedIndex = pane.getSelectedIndex();
PositionType placement = GTKLookAndFeel.SwingOrientationConstantToGTK(
pane.getTabPlacement());
int gapStart = 0;
int gapSize = 0;
if (selectedIndex != -1) {
Rectangle tabBounds = pane.getBoundsAt(selectedIndex);
if (placement == PositionType.TOP ||
placement == PositionType.BOTTOM) {
gapStart = tabBounds.x - x;
gapSize = tabBounds.width;
}
else {
gapStart = tabBounds.y - y;
gapSize = tabBounds.height;
}
}
Region id = context.getRegion();
int gtkState = GTKLookAndFeel.synthStateToGTKState(
id, context.getComponentState());
synchronized (UNIXToolkit.GTK_LOCK) {
if (! ENGINE.paintCachedImage(g, x, y, w, h,
id, gtkState, placement, gapStart, gapSize)) {
ENGINE.startPainting(g, x, y, w, h,
id, gtkState, placement, gapStart, gapSize);
ENGINE.paintBoxGap(g, context, id, gtkState, ShadowType.OUT,
"notebook", x, y, w, h, placement, gapStart, gapSize);
ENGINE.finishPainting();
}
}
}