本文整理汇总了Java中com.intellij.CommonBundle.getCancelButtonText方法的典型用法代码示例。如果您正苦于以下问题:Java CommonBundle.getCancelButtonText方法的具体用法?Java CommonBundle.getCancelButtonText怎么用?Java CommonBundle.getCancelButtonText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.CommonBundle
的用法示例。
在下文中一共展示了CommonBundle.getCancelButtonText方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCenterPanel
import com.intellij.CommonBundle; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new BorderLayout(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP));
myList = new JBList(myNamedElements);
myList.setCellRenderer(new FQNameCellRenderer());
panel.add(ScrollPaneFactory.createScrollPane(myList), BorderLayout.CENTER);
panel.add(new JBLabel(myContainsClassesOnly ?
CodeInsightBundle.message("dialog.paste.on.import.text") :
CodeInsightBundle.message("dialog.paste.on.import.text2"), SMALL, BRIGHTER), BorderLayout.NORTH);
final JPanel buttonPanel = new JPanel(new VerticalFlowLayout());
final JButton okButton = new JButton(CommonBundle.getOkButtonText());
getRootPane().setDefaultButton(okButton);
buttonPanel.add(okButton);
final JButton cancelButton = new JButton(CommonBundle.getCancelButtonText());
buttonPanel.add(cancelButton);
panel.setPreferredSize(JBUI.size(500, 400));
return panel;
}
示例2: checkReadOnlyFiles
import com.intellij.CommonBundle; //导入方法依赖的package包/类
private boolean checkReadOnlyFiles() throws IOException {
List<File> files = getReadOnlyFiles();
if (!files.isEmpty()) {
final String message = IdeBundle.message("message.text.unlock.read.only.files",
ApplicationNamesInfo.getInstance().getFullProductName(),
getFilesString(files));
final String[] options = {CommonBundle.getContinueButtonText(), CommonBundle.getCancelButtonText()};
if (Messages.showOkCancelDialog(myMainPanel, message, IdeBundle.message("dialog.title.convert.project"), options[0], options[1], null) != Messages.OK) {
return false;
}
unlockFiles(files);
files = getReadOnlyFiles();
if (!files.isEmpty()) {
showErrorMessage(IdeBundle.message("error.message.cannot.make.files.writable", getFilesString(files)));
return false;
}
}
return true;
}
示例3: showMessage
import com.intellij.CommonBundle; //导入方法依赖的package包/类
private int showMessage(@Nullable Component parentComponent) {
String okText = "Fix it";
String cancelText = CommonBundle.getCancelButtonText();
Icon icon = Messages.getErrorIcon();
String title = myNotificationErrorTitle;
String description = myNotificationErrorDescription;
return parentComponent != null
? Messages.showOkCancelDialog(parentComponent, description, title, okText, cancelText, icon)
: Messages.showOkCancelDialog(myProject, description, title, okText, cancelText, icon);
}
示例4: checkLookAndFeel
import com.intellij.CommonBundle; //导入方法依赖的package包/类
private boolean checkLookAndFeel(final UIManager.LookAndFeelInfo lafInfo, final boolean confirm) {
String message = null;
if (lafInfo.getName().contains("GTK") && SystemInfo.isXWindow && !SystemInfo.isJavaVersionAtLeast("1.6.0_12")) {
message = IdeBundle.message("warning.problem.laf.1");
}
if (message != null) {
if (confirm) {
final String[] options = {IdeBundle.message("confirm.set.look.and.feel"), CommonBundle.getCancelButtonText()};
final int result = Messages.showOkCancelDialog(message, CommonBundle.getWarningTitle(), options[0], options[1], Messages.getWarningIcon());
if (result == Messages.OK) {
myLastWarning = message;
return true;
}
return false;
}
if (!message.equals(myLastWarning)) {
Notifications.Bus.notify(new Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, "L&F Manager", message, NotificationType.WARNING,
NotificationListener.URL_OPENING_LISTENER));
myLastWarning = message;
}
}
return true;
}
示例5: showResults
import com.intellij.CommonBundle; //导入方法依赖的package包/类
private ReturnResult showResults(final TodoCheckinHandlerWorker worker, CommitExecutor executor) {
String commitButtonText = executor != null ? executor.getActionText() : myCheckinProjectPanel.getCommitActionName();
if (commitButtonText.endsWith("...")) {
commitButtonText = commitButtonText.substring(0, commitButtonText.length()-3);
}
final String text = createMessage(worker);
final String[] buttons;
final boolean thereAreTodoFound = worker.getAddedOrEditedTodos().size() + worker.getInChangedTodos().size() > 0;
int commitOption;
if (thereAreTodoFound) {
buttons = new String[]{VcsBundle.message("todo.in.new.review.button"), commitButtonText, CommonBundle.getCancelButtonText()};
commitOption = 1;
}
else {
buttons = new String[]{commitButtonText, CommonBundle.getCancelButtonText()};
commitOption = 0;
}
final int answer = Messages.showDialog(myProject, text, "TODO", null, buttons, 0, 1, UIUtil.getWarningIcon());
if (thereAreTodoFound && answer == Messages.OK) {
showTodo(worker);
return ReturnResult.CLOSE_WINDOW;
}
if (answer == commitOption) {
return ReturnResult.COMMIT;
}
return ReturnResult.CANCEL;
}
示例6: show
import com.intellij.CommonBundle; //导入方法依赖的package包/类
public static int show(final Project project,
final String sessionName,
final TerminateOption option) {
final String message = option.myAlwaysUseDefault && !option.myDetach ?
ExecutionBundle.message("terminate.process.confirmation.text", sessionName) :
ExecutionBundle.message("disconnect.process.confirmation.text", sessionName);
final String okButtonText = option.myAlwaysUseDefault && !option.myDetach ?
ExecutionBundle.message("button.terminate") :
ExecutionBundle.message("button.disconnect");
final String[] options = new String[] {okButtonText, CommonBundle.getCancelButtonText()};
return Messages.showDialog(project, message, ExecutionBundle.message("process.is.running.dialog.title", sessionName),
options, 0, Messages.getWarningIcon(),
option);
}
示例7: getCancelActionName
import com.intellij.CommonBundle; //导入方法依赖的package包/类
@Override
@NotNull
protected String getCancelActionName() {
return CommonBundle.getCancelButtonText();
}
示例8: CancelAction
import com.intellij.CommonBundle; //导入方法依赖的package包/类
private CancelAction() {
super(CommonBundle.getCancelButtonText());
}
示例9: getCancelButtonText
import com.intellij.CommonBundle; //导入方法依赖的package包/类
protected String getCancelButtonText() {
return CommonBundle.getCancelButtonText();
}