本文整理了Java中javax.swing.JTabbedPane.hasFocus()
方法的一些代码示例,展示了JTabbedPane.hasFocus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.hasFocus()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:hasFocus
暂无
代码示例来源:origin: net.sf.nimrod/nimrod-laf
/**
* Este metodo dibuja una se�al amarilla en la solapa que tiene el foco
*/
protected void paintFocusIndicator( Graphics g, int tabPlacement,
Rectangle[] rects, int tabIndex,
Rectangle iconRect, Rectangle textRect,
boolean isSelected) {
if ( tabPane.hasFocus() && isSelected) {
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Stroke oldStroke = g2d.getStroke();
g2d.setStroke( new BasicStroke( 2.0f));
g2d.setColor( UIManager.getColor( "ScrollBar.thumbShadow"));
g2d.drawPolygon( shape);
g2d.setStroke( oldStroke);
g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_DEFAULT);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
if (tabPane.hasFocus() && isSelected)
代码示例来源:origin: com.jtattoo/JTattoo
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) {
if (tabPane.isRequestFocusEnabled() && tabPane.hasFocus() && isSelected && tabIndex >= 0 && textRect.width > 8) {
g.setColor(AbstractLookAndFeel.getTheme().getFocusColor());
BasicGraphicsUtils.drawDashedRect(g, textRect.x - 4, textRect.y + 1, textRect.width + 8, textRect.height);
}
}
代码示例来源:origin: com.jtattoo/JTattoo
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) {
if (tabPane.isRequestFocusEnabled() && tabPane.hasFocus() && isSelected && tabIndex >= 0 && textRect.width > 8) {
g.setColor(AbstractLookAndFeel.getTheme().getFocusColor());
BasicGraphicsUtils.drawDashedRect(g, textRect.x - 4, textRect.y, textRect.width + 8, textRect.height);
BasicGraphicsUtils.drawDashedRect(g, textRect.x - 3, textRect.y + 1, textRect.width + 6, textRect.height - 2);
}
}
代码示例来源:origin: khuxtable/seaglass
if (hasFocus && tabPane.hasFocus()) {
内容来源于网络,如有侵权,请联系作者删除!