本文整理匯總了Java中com.intellij.util.ui.UIUtil.setActionNameAndMnemonic方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.setActionNameAndMnemonic方法的具體用法?Java UIUtil.setActionNameAndMnemonic怎麽用?Java UIUtil.setActionNameAndMnemonic使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.util.ui.UIUtil
的用法示例。
在下文中一共展示了UIUtil.setActionNameAndMnemonic方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createButtonsPanel
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private JPanel createButtonsPanel() {
AbstractAction revert = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
revert();
close();
}
};
UIUtil.setActionNameAndMnemonic(LocalHistoryBundle.message("action.revert"), revert);
JPanel p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
p.add(Box.createHorizontalGlue());
p.add(new JButton(revert));
return p;
}
示例2: createActions
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
@Override
protected Action[] createActions() {
List<AbstractAction> actions = new ArrayList<AbstractAction>();
myRemoveAllAction = new AbstractAction() {
{
UIUtil.setActionNameAndMnemonic(QuickFixBundle.message("side.effect.action.remove"), this);
putValue(DEFAULT_ACTION, this);
}
@Override
public void actionPerformed(@NotNull ActionEvent e) {
close(RemoveUnusedVariableUtil.RemoveMode.DELETE_ALL.ordinal());
}
};
actions.add(myRemoveAllAction);
if (myCanCopeWithSideEffects) {
AbstractAction makeStmtAction = new AbstractAction() {
{
UIUtil.setActionNameAndMnemonic(QuickFixBundle.message("side.effect.action.transform"), this);
}
@Override
public void actionPerformed(@NotNull ActionEvent e) {
close(RemoveUnusedVariableUtil.RemoveMode.MAKE_STATEMENT.ordinal());
}
};
actions.add(makeStmtAction);
}
myCancelAllAction = new AbstractAction() {
{
UIUtil.setActionNameAndMnemonic(QuickFixBundle.message("side.effect.action.cancel"), this);
}
@Override
public void actionPerformed(@NotNull ActionEvent e) {
doCancelAction();
}
};
actions.add(myCancelAllAction);
return actions.toArray(new Action[actions.size()]);
}
示例3: AbstractAddOptionsDialog
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public AbstractAddOptionsDialog(Project project, Options options) {
super(project);
myOptions = options;
UIUtil.setActionNameAndMnemonic(CvsBundle.message("button.text.add.to.cvs"), getOKAction());
}
示例4: createActions
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
protected Action[] createActions() {
Action okAction = getOKAction();
UIUtil.setActionNameAndMnemonic(com.intellij.CvsBundle.message("button.text.close"), okAction);
return new Action[]{okAction};
}