本文整理了Java中javax.swing.JTabbedPane.setDisabledIconAt()
方法的一些代码示例,展示了JTabbedPane.setDisabledIconAt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.setDisabledIconAt()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:setDisabledIconAt
暂无
代码示例来源:origin: xyz.cofe/gui.swing
@Override
public void setDisabledIconAt(int index, Icon disabledIcon) {
Component cmpt = this.getTabComponentAt(index);
if( cmpt instanceof TabQuery )((TabQuery)cmpt).setTabDisabledIcon(disabledIcon);
super.setDisabledIconAt(index, disabledIcon);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing
@Override
public void propertyChange(PropertyChangeEvent e) {
String name = e.getPropertyName();
if (name.equals(TabInfo.TITLE_PROPERTY)) {
tabs.setTitleAt(tabIndex, (String) e.getNewValue());
} else if (name.equals(TabInfo.TOOL_TIP_TEXT_PROPERTY)) {
tabs.setToolTipTextAt(tabIndex, (String) e.getNewValue());
} else if (name.equals(TabInfo.FOREGROUND_PROPERTY)) {
tabs.setForegroundAt(tabIndex, (Color) e.getNewValue());
} else if (name.equals(TabInfo.BACKGROUND_PROPERTY)) {
tabs.setBackgroundAt(tabIndex, (Color) e.getNewValue());
} else if (name.equals(TabInfo.MNEMONIC_PROPERTY)) {
tabs.setMnemonicAt(tabIndex, (Integer) e.getNewValue());
} else if (name.equals(TabInfo.DISPLAYED_MNEMONIC_INDEX_PROPERTY)) {
tabs.setDisplayedMnemonicIndexAt(tabIndex, (Integer) e.getNewValue());
} else if (name.equals(TabInfo.ICON_PROPERTY)) {
tabs.setIconAt(tabIndex, (Icon) e.getNewValue());
} else if (name.equals(TabInfo.DISABLED_ICON_PROPERTY)) {
tabs.setDisabledIconAt(tabIndex, (Icon) e.getNewValue());
}
}
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime
@Override
public void propertyChange(PropertyChangeEvent e) {
String name = e.getPropertyName();
if (name.equals(TabInfo.TITLE_PROPERTY)) {
tabs.setTitleAt(tabIndex, (String) e.getNewValue());
} else if (name.equals(TabInfo.TOOL_TIP_TEXT_PROPERTY)) {
tabs.setToolTipTextAt(tabIndex, (String) e.getNewValue());
} else if (name.equals(TabInfo.FOREGROUND_PROPERTY)) {
tabs.setForegroundAt(tabIndex, (Color) e.getNewValue());
} else if (name.equals(TabInfo.BACKGROUND_PROPERTY)) {
tabs.setBackgroundAt(tabIndex, (Color) e.getNewValue());
} else if (name.equals(TabInfo.MNEMONIC_PROPERTY)) {
tabs.setMnemonicAt(tabIndex, (Integer) e.getNewValue());
} else if (name.equals(TabInfo.DISPLAYED_MNEMONIC_INDEX_PROPERTY)) {
tabs.setDisplayedMnemonicIndexAt(tabIndex, (Integer) e.getNewValue());
} else if (name.equals(TabInfo.ICON_PROPERTY)) {
tabs.setIconAt(tabIndex, (Icon) e.getNewValue());
} else if (name.equals(TabInfo.DISABLED_ICON_PROPERTY)) {
tabs.setDisabledIconAt(tabIndex, (Icon) e.getNewValue());
} else if (name.equals(TabInfo.TAB_COMPONENT_PROPERTY)) {
tabs.setTabComponentAt(tabIndex, (Component) e.getNewValue());
} else if (name.equals(TabInfo.ENABLED_PROPERTY)) {
tabs.setEnabledAt(tabIndex, (Boolean) e.getNewValue());
}
}
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime
@Override
public void propertyChange(PropertyChangeEvent e) {
String name = e.getPropertyName();
if (name.equals(TabInfo.TITLE_PROPERTY)) {
tabs.setTitleAt(tabIndex, (String) e.getNewValue());
} else if (name.equals(TabInfo.TOOL_TIP_TEXT_PROPERTY)) {
tabs.setToolTipTextAt(tabIndex, (String) e.getNewValue());
} else if (name.equals(TabInfo.FOREGROUND_PROPERTY)) {
tabs.setForegroundAt(tabIndex, (Color) e.getNewValue());
} else if (name.equals(TabInfo.BACKGROUND_PROPERTY)) {
tabs.setBackgroundAt(tabIndex, (Color) e.getNewValue());
} else if (name.equals(TabInfo.MNEMONIC_PROPERTY)) {
tabs.setMnemonicAt(tabIndex, (Integer) e.getNewValue());
} else if (name.equals(TabInfo.DISPLAYED_MNEMONIC_INDEX_PROPERTY)) {
tabs.setDisplayedMnemonicIndexAt(tabIndex, (Integer) e.getNewValue());
} else if (name.equals(TabInfo.ICON_PROPERTY)) {
tabs.setIconAt(tabIndex, (Icon) e.getNewValue());
} else if (name.equals(TabInfo.DISABLED_ICON_PROPERTY)) {
tabs.setDisabledIconAt(tabIndex, (Icon) e.getNewValue());
} else if (name.equals(TabInfo.TAB_COMPONENT_PROPERTY)) {
tabs.setTabComponentAt(tabIndex, (Component) e.getNewValue());
} else if (name.equals(TabInfo.ENABLED_PROPERTY)) {
tabs.setEnabledAt(tabIndex, (Boolean) e.getNewValue());
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-terminal-nb
/**
* Restore attributes that are maintained by the tabbedPane.
*
* Called when a component is added to a tabbed pane.
* No need to do anything (i.e. save) when we remove a component.
*
* Also called on individual attribute settings like
* setIcon(JComponent, Icon). Note that this method is overkill
* for this purpose. I.e. it will set title etc as well.
* If this ever becomes an issue we can pass a mask to control
* what exactly gets restored.
* @param comp
*/
@Override
protected void restoreAttrsFor(JComponent comp) {
int index = tabbedPane.indexOfComponent(comp);
if (index == -1)
return;
Attributes attrs = attributesFor(comp);
tabbedPane.setTitleAt(index, attrs.title);
tabbedPane.setIconAt(index, attrs.icon);
tabbedPane.setDisabledIconAt(index, attrs.icon);
// output2 "stores" toolTipText as the components
// attribute
tabbedPane.setToolTipTextAt(index, attrs.toolTipText);
}
代码示例来源:origin: org.xworker/xworker_core
parent.setDisabledIconAt(index, disabledIcon);
内容来源于网络,如有侵权,请联系作者删除!