本文整理汇总了Java中com.intellij.ide.ui.UISettings.getShadowInstance方法的典型用法代码示例。如果您正苦于以下问题:Java UISettings.getShadowInstance方法的具体用法?Java UISettings.getShadowInstance怎么用?Java UISettings.getShadowInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.ui.UISettings
的用法示例。
在下文中一共展示了UISettings.getShadowInstance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerMnemonic
import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
public static void registerMnemonic(final AbstractButton button, char mn) {
final String text = button.getText();
if (text != null) {
final StringBuilder realText = new StringBuilder();
char mnemonic = '\0';
int index = -1;
for (int i = 0; i < text.length(); i++) {
final char ch = text.charAt(i);
if (ch != mn) {
realText.append(ch);
} else if (i + 1 < text.length()) {
mnemonic = text.charAt(i + 1);
index = realText.length();
}
}
if (mnemonic != '\0') {
button.setText(realText.toString());
if (UISettings.getShadowInstance().DISABLE_MNEMONICS_IN_CONTROLS) {
button.setMnemonic(0);
button.setDisplayedMnemonicIndex(-1);
button.setFocusable(true);
}
else {
button.setMnemonic(mnemonic);
button.setDisplayedMnemonicIndex(index);
}
}
}
}
示例2: isDisabled
import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
boolean isDisabled() {
return UISettings.getShadowInstance().DISABLE_MNEMONICS_IN_CONTROLS;
}
示例3: initFocusability
import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
private void initFocusability() {
if (!UISettings.getShadowInstance().DISABLE_MNEMONICS_IN_CONTROLS) { // Or that won't be keyboard accessible at all
setFocusable(false);
}
}