本文整理汇总了Java中org.eclipse.swt.SWT.ICON_INFORMATION属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.ICON_INFORMATION属性的具体用法?Java SWT.ICON_INFORMATION怎么用?Java SWT.ICON_INFORMATION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.ICON_INFORMATION属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeCordovaDirectory
/***
* Dialog yes/no which ask to user if we want
* remove the cordova directory present into "_private" directory
* We also explain, what we do and how to recreate the cordova environment
*/
public void removeCordovaDirectory() {
String mobilePlatformName = mobilePlatform.getName();
if (parentShell != null) {
MessageBox customDialog = new MessageBox(parentShell, SWT.ICON_INFORMATION | SWT.YES | SWT.NO);
customDialog.setText("Remove cordova directory");
customDialog.setMessage("Do you want to remove the Cordova directory located in \"_private\\localbuild\\" +
mobilePlatformName + "\" directory?\n\n" +
"It will also remove this project's Cordova environment!\n\n" +
"To recreate the project's Cordova environment, you just need to run a new local build."
);
if (customDialog.open() == SWT.YES) {
buildLocally.removeCordovaDirectory();
} else {
return;
}
} else {
//TODO
}
}
示例2: execute
@Override
public Object execute(ExecutionEvent event) {
IWorkbenchPart part = HandlerUtil.getActiveEditor(event);
if (part instanceof SQLEditor){
SQLEditor sqlEditor = (SQLEditor) part;
if (sqlEditor.getCurrentDb() != null) {
sqlEditor.updateDdl();
} else {
MessageBox mb = new MessageBox(HandlerUtil.getActiveShell(event), SWT.ICON_INFORMATION);
mb.setText(Messages.UpdateDdl_select_source);
mb.setMessage(Messages.UpdateDdl_select_source_msg);
mb.open();
}
}
return null;
}
示例3: cancelPressed
@Override
protected void cancelPressed() {
if (isAnyUpdatePerformed) {
int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO |SWT.ICON_INFORMATION;
MessageBox messageBox = new MessageBox(new Shell(), style);
messageBox.setText(INFORMATION);
messageBox.setMessage(Messages.MessageBeforeClosingWindow);
if (messageBox.open() == SWT.YES) {
closeDialog = super.close();
}
} else {
closeDialog = super.close();
}
}
示例4: getListener
@Override
public Listener getListener(PropertyDialogButtonBar propertyDialogButtonBar, ListenerHelper helpers,
Widget... widgets) {
final Widget[] widgetList = widgets;
Listener listener = new Listener() {
@Override
public void handleEvent(Event event) {
if (StringUtils.equalsIgnoreCase(((Button) widgetList[0]).getText(), String.valueOf(FAST_LOAD)) && ((Button) widgetList[0]).getSelection() ) {
MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(),
SWT.ICON_INFORMATION | SWT.OK);
messageBox.setText(INFORMATION);
messageBox.setMessage(Messages.FAST_LOAD_ERROR_MESSAGE);
messageBox.open();
}
}
};
return listener;
}
示例5: getListener
@Override
public Listener getListener(final PropertyDialogButtonBar propertyDialogButtonBar, ListenerHelper helper,
Widget... widgets) {
final Widget[] widgetList = widgets;
Listener listener = new Listener() {
@Override
public void handleEvent(Event event) {
if (StringUtils.equalsIgnoreCase(((Combo) widgetList[0]).getText(), String.valueOf(Boolean.TRUE))) {
MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(),
SWT.ICON_INFORMATION | SWT.OK);
messageBox.setText(INFORMATION);
messageBox.setMessage("All files at given location will be overwritten.");
messageBox.open();
}
}
};
return listener;
}
示例6: showAboutAppleCommander
public void showAboutAppleCommander() {
final Shell finalShell = shell;
MessageBox box = new MessageBox(finalShell, SWT.ICON_INFORMATION | SWT.OK);
box.setText(textBundle.get("SwtAppleCommander.AboutTitle")); //$NON-NLS-1$
box.setMessage(
textBundle.format("SwtAppleCommander.AboutMessage", //$NON-NLS-1$
new Object[] { AppleCommander.VERSION, textBundle.get("Copyright") })); //$NON-NLS-1$
box.open();
}
示例7: warnCheckedElements
/**
* @return number of checked elements
*/
private int warnCheckedElements() {
int checked = diffTable.getCheckedElementsCount();
if (checked < 1) {
MessageBox mb = new MessageBox(parent.getShell(), SWT.ICON_INFORMATION);
mb.setMessage(Messages.please_check_at_least_one_row);
mb.setText(Messages.empty_selection);
mb.open();
}
return checked;
}
示例8: isParamterFileNameExistInFileGrid
private boolean isParamterFileNameExistInFileGrid(String[] listOfFilesToBeImported, ParamterFileTypes paramterFileTypes) {
if (ifDuplicate(listOfFilesToBeImported, paramterFileTypes)) {
MessageBox messageBox = new MessageBox(new Shell(), SWT.ICON_INFORMATION | SWT.OK);
messageBox.setText(MessageType.INFO.messageType());
messageBox.setMessage(ErrorMessages.FILE_EXIST);
messageBox.open();
return true;
}
return false;
}
示例9: open
public void open(){
if(messageType==SWT.ERROR){
MessageDialog.setDefaultOrientation(SWT.NONE);
MessageDialog.openError(Display.getCurrent().getActiveShell(), title, message);
}
if(messageType==SWT.ICON_INFORMATION){
MessageDialog.openInformation(Display.getCurrent().getActiveShell(), title, message);
}
if(messageType==SWT.ICON_WARNING){
MessageDialog.openWarning(Display.getCurrent().getActiveShell(), title, message);
}
}
示例10: cancelPressed
@Override
protected void cancelPressed() {
if (isAnyUpdatePerformed) {
int style = SWT.APPLICATION_MODAL | SWT.OK | SWT.CANCEL |SWT.ICON_INFORMATION;
MessageBox messageBox = new MessageBox(getShell(), style);
messageBox.setText(Messages.INFORMATION); //$NON-NLS-1$
messageBox.setMessage(Messages.MessageBeforeClosingWindow);
if (messageBox.open() == SWT.OK) {
closeDialog = super.close();
}
} else {
closeDialog = super.close();
}
}
示例11: cancelPressed
@Override
protected void cancelPressed() {
if (isAnyUpdatePerformed) {
int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO |SWT.ICON_INFORMATION;
MessageBox messageBox = new MessageBox(getShell(), style);
messageBox.setText(INFORMATION); //$NON-NLS-1$
messageBox.setMessage(Messages.MessageBeforeClosingWindow);
if (messageBox.open() == SWT.YES) {
closeDialog = super.close();
}
} else {
closeDialog = super.close();
}
}
示例12: hasOutputMappingInTableChanged
private Boolean hasOutputMappingInTableChanged() {
boolean returnValue = false;
populateCurrentItemsOfTable();
if (currentItems.length == 0 && previousItems.length == 0) {
super.close();
} else {
if (!Arrays.equals(currentItems, previousItems)) {
int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO | SWT.ICON_INFORMATION;
MessageBox messageBox = new MessageBox(new Shell(), style);
messageBox.setText(INFORMATION);
messageBox.setMessage(Messages.MessageBeforeClosingWindow);
if (messageBox.open() == SWT.YES) {
joinOutputList.clear();
LookupMapProperty[] lookupMapPropertyObjects = new LookupMapProperty[previousItems.length];
for (int i = 0; i < previousItems.length; i++) {
if(!previousItems[i].isDisposed())
{
lookupMapPropertyObjects[i] = (LookupMapProperty) previousItems[i].getData();
joinOutputList.add(lookupMapPropertyObjects[i]);
}
}
getLookupPropertyGrid();
returnValue = super.close();
}
} else {
returnValue = super.close();
}
}
return returnValue;
}
示例13: hasOutputMappingInTableChanged
private Boolean hasOutputMappingInTableChanged() {
boolean returnValue = false;
populateCurrentItemsOfTable();
if (currentItems.length == 0 && previousItems.length == 0) {
super.close();
} else {
if (!Arrays.equals(currentItems, previousItems)) {
int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO | SWT.ICON_INFORMATION;
MessageBox messageBox = new MessageBox(new Shell(), style);
messageBox.setText(INFORMATION);
messageBox.setMessage(Messages.MessageBeforeClosingWindow);
if (messageBox.open() == SWT.YES) {
joinOutputList.clear();
LookupMapProperty[] lookupMapPropertyObjects = new LookupMapProperty[previousItems.length];
for (int i = 0; i < previousItems.length; i++) {
if(!previousItems[i].isDisposed())
{
lookupMapPropertyObjects[i] = (LookupMapProperty) previousItems[i].getData();
joinOutputList.add(lookupMapPropertyObjects[i]);
}
}
getJoinPropertyGrid();
returnValue = super.close();
}
} else {
returnValue = super.close();
}
}
return returnValue;
}
示例14: cancelPressed
@Override
protected void cancelPressed() {
if (isAnyUpdatePerformed) {
int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO |SWT.ICON_INFORMATION;
MessageBox messageBox = new MessageBox(new Shell(), style);
messageBox.setText(INFORMATION);
messageBox.setMessage(Messages.MessageBeforeClosingWindow);
if (messageBox.open() == SWT.YES) {
closeDialog = super.close();
}
} else {
closeDialog = super.close();
}
}
示例15: getMessageBoxIcon
private int getMessageBoxIcon(String messageBoxType){
if(StringUtils.equals(MessageBoxText.ERROR, messageBoxType)){
return SWT.ICON_ERROR;
}else if(StringUtils.equals(MessageBoxText.WARNING, messageBoxType)){
return SWT.ICON_WARNING;
}else{
return SWT.ICON_INFORMATION;
}
}