本文整理了Java中javax.swing.JTabbedPane.isEnabledAt()
方法的一些代码示例,展示了JTabbedPane.isEnabledAt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.isEnabledAt()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:isEnabledAt
暂无
代码示例来源:origin: stackoverflow.com
g2D.setPaint(gradientShadow);
} else {
if (tabPane.isEnabled() && tabPane.isEnabledAt(tabIndex)) {
g2D.setColor(deSelectColor);
GradientPaint gradientShadowTmp = new GradientPaint(0, 0, new Color(255, 255, 200), 0, y + h / 2, new Color(240, 255, 210));
if (tabPane.isEnabled() && tabPane.isEnabledAt(tabIndex)) {
g.setColor(tabPane.getForegroundAt(tabIndex));
BasicGraphicsUtils.drawStringUnderlineCharAt(g, title, mnemIndex, textRect.x, textRect.y + metrics.getAscent());
代码示例来源:origin: com.jtattoo/JTattoo
protected int getUnSelectedTexture(int tabIndex) {
if (tabIndex == rolloverIndex && tabPane.isEnabledAt(tabIndex)) {
return TextureUtils.ROLLOVER_TEXTURE_TYPE;
}
return TextureUtils.ALTER_BACKGROUND_TEXTURE_TYPE;
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
public boolean isSensitiveToEvents(JTabbedPane tabPane, int tabIndex) {
return tabPane.isEnabledAt(tabIndex);
}
代码示例来源:origin: org.fudaa.framework.fudaa/fudaa-common
/**
* Retourne l'activit ou non du panneau taille.
*/
public boolean isPanneauTailleEnabled() {
return pnDefinitions.isEnabledAt(pnDefinitions.indexOfTab("Taille"));
}
/**
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
public final boolean isViewEnabled(Component view) {
int viewIndex = getViewIndex(view);
if (viewIndex == -1) return false;
return tabs == null ? false : tabs.isEnabledAt(viewIndex);
// TODO: handle single view (no tabs) - introduce firstEnabled?
}
代码示例来源:origin: joel-costigliola/assertj-swing
@RunsInEDT
@Nullable private static boolean isEnabledAt(final @Nonnull JTabbedPane tabbedPane, final @Nonnull Index index) {
return execute(() -> tabbedPane.isEnabledAt(index.value));
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected void selectPreviousTab(int current)
{
int tabIndex= getPreviousTabIndex(current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex))
{
tabIndex= getPreviousTabIndex(tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: com.jtattoo/JTattoo
protected void selectNextTab(int current) {
int tabIndex = getNextTabIndex(current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex)) {
tabIndex = getNextTabIndex(tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: com.jtattoo/JTattoo
protected void selectPreviousTab(int current) {
int tabIndex = getPreviousTabIndex(current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex)) {
tabIndex = getPreviousTabIndex(tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected void selectNextTab(int current)
{
int tabIndex= getNextTabIndex(current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex))
{
tabIndex= getNextTabIndex(tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
public void mouseExited(MouseEvent e) {
if ((this.prevRolledOver >= 0)
&& (this.prevRolledOver < jcomp.getTabCount())
&& jcomp.isEnabledAt(this.prevRolledOver)) {
TabPreviewWindow.cancelPreviewRequest();
}
this.prevRolledOver = -1;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
public static int getNextSubTabIndex(JTabbedPane tabs, int tabIndex) {
int nextTabIndex = tabIndex;
for (int i = 0; i < tabs.getComponentCount(); i++) {
nextTabIndex++;
if (nextTabIndex == tabs.getComponentCount()) {
nextTabIndex = 0;
}
if (tabs.isEnabledAt(nextTabIndex)) {
break;
}
}
return nextTabIndex;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
public static int getPreviousSubTabIndex(JTabbedPane tabs, int tabIndex) {
int previousTabIndex = tabIndex;
for (int i = 0; i < tabs.getComponentCount(); i++) {
previousTabIndex--;
if (previousTabIndex < 0) {
previousTabIndex = tabs.getComponentCount() - 1;
}
if (tabs.isEnabledAt(previousTabIndex)) {
break;
}
}
return previousTabIndex;
}
代码示例来源:origin: com.jtattoo/JTattoo
protected void selectPreviousTabInRun(int current) {
int tc = tabPane.getTabCount();
int tabIndex = getPreviousTabIndexInRun(tc, current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex)) {
tabIndex = getPreviousTabIndexInRun(tc, tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: com.jtattoo/JTattoo
protected void selectNextTabInRun(int current) {
int tc = tabPane.getTabCount();
int tabIndex = getNextTabIndexInRun(tc, current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex)) {
tabIndex = getNextTabIndexInRun(tc, tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected void selectNextTabInRun(int current)
{
int tabCount= tabPane.getTabCount();
int tabIndex= getNextTabIndexInRun(tabCount, current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex))
{
tabIndex= getNextTabIndexInRun(tabCount, tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected void selectPreviousTabInRun(int current)
{
int tabCount= tabPane.getTabCount();
int tabIndex= getPreviousTabIndexInRun(tabCount, current);
while (tabIndex != current && !tabPane.isEnabledAt(tabIndex))
{
tabIndex= getPreviousTabIndexInRun(tabCount, tabIndex);
}
tabPane.setSelectedIndex(tabIndex);
}
代码示例来源:origin: com.jtattoo/JTattoo
protected Icon getIconForTab(int tabIndex) {
if (tabIndex >= 0 && tabIndex < tabCount) {
return (!tabPane.isEnabled() || !tabPane.isEnabledAt(tabIndex)) ? tabPane.getDisabledIconAt(tabIndex) : tabPane.getIconAt(tabIndex);
}
return null;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
protected Icon getIconForTab(int tabIndex)
{
return (!tabPane.isEnabled() || !tabPane.isEnabledAt(tabIndex))
? tabPane.getDisabledIconAt(tabIndex)
: tabPane.getIconAt(tabIndex);
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
private void checkRollOver(int tabIndex) {
if(rollover >= tabPane.getTabCount()) {
rollover = -1;
}
if(tabIndex == rollover) return;
if(rollover != -1) { // Update old rollover
tabPane.repaint(getTabBounds(tabPane, rollover));
if(tabIndex == -1) rollover = -1;
}
if(tabIndex >= 0 && tabPane.isEnabledAt(tabIndex)) {
// Paint new rollover
rollover = tabIndex;
tabPane.repaint(getTabBounds(tabPane, tabIndex));
}
}
内容来源于网络,如有侵权,请联系作者删除!