本文整理汇总了Java中org.eclipse.jface.dialogs.TitleAreaDialog类的典型用法代码示例。如果您正苦于以下问题:Java TitleAreaDialog类的具体用法?Java TitleAreaDialog怎么用?Java TitleAreaDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TitleAreaDialog类属于org.eclipse.jface.dialogs包,在下文中一共展示了TitleAreaDialog类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buttonPressed
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
/***************************************************************************
* Called when one of the buttons of the button bar is pressed.
*
* @param buttonId
* The button identifier.
**************************************************************************/
protected void buttonPressed(int buttonId)
{
switch (buttonId)
{
case IDialogConstants.OK_ID:
m_answer = m_text.getText();
if (m_answer.length() == 0) { return; }
setReturnCode(TitleAreaDialog.OK);
break;
case IDialogConstants.CANCEL_ID:
m_answer = null;
setReturnCode(TitleAreaDialog.CANCEL);
break;
}
close();
}
示例2: doubleClick
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
@Override
public void doubleClick(DoubleClickEvent event)
{
Object item = ((IStructuredSelection) event.getSelection()).getFirstElement();
if (item instanceof FunctionEntry)
{
CommandDialog dialog = new CommandDialog(editor, (FunctionEntry) item);
int result = dialog.open();
if (result == TitleAreaDialog.OK)
{
System.out.println("Command erstellt: " + dialog.getCommand());
editor.addCommand(dialog.getCommand());
}
}
}
示例3: NewBfFileCreationWizardPage
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
public NewBfFileCreationWizardPage(IStructuredSelection selection) {
super(PAGE_NAME, selection);
this.setFileExtension(EditorConstants.BF_FILE_EXTENSION);
this.setTitle(PAGE_NAME);
// this.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor("IMG_WIZBAN_NEW_WIZ"));
this.setImageDescriptor(JFaceResources.getImageRegistry().getDescriptor(TitleAreaDialog.DLG_IMG_TITLE_BANNER));
// this.setImageDescriptor(null);
}
示例4: openMonitorDialog
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
public static void openMonitorDialog(final TitleAreaDialog dialog) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
dialog.create();
dialog.open();
}
});
}
示例5: initializeDefaultImages
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
/**
* Initialize default images in JFace's image registry.
*
*/
private static void initializeDefaultImages() {
Object bundle = null;
// try {
// bundle = JFaceActivator.getBundle();
// } catch (NoClassDefFoundError exception) {
// // Test to see if OSGI is present
// }
declareImage(bundle, Wizard.DEFAULT_IMAGE, ICONS_PATH + "page.gif", //$NON-NLS-1$
Wizard.class, "images/page.gif"); //$NON-NLS-1$
// register default images for dialogs
declareImage(bundle, Dialog.DLG_IMG_MESSAGE_INFO, ICONS_PATH
+ "message_info.gif", Dialog.class, "images/message_info.gif"); //$NON-NLS-1$ //$NON-NLS-2$
declareImage(bundle, Dialog.DLG_IMG_MESSAGE_WARNING, ICONS_PATH
+ "message_warning.gif", Dialog.class, //$NON-NLS-1$
"images/message_warning.gif"); //$NON-NLS-1$
declareImage(bundle, Dialog.DLG_IMG_MESSAGE_ERROR, ICONS_PATH
+ "message_error.gif", Dialog.class, "images/message_error.gif");//$NON-NLS-1$ //$NON-NLS-2$
declareImage(bundle, Dialog.DLG_IMG_HELP,
ICONS_PATH + "help.gif", Dialog.class, "images/help.gif");//$NON-NLS-1$ //$NON-NLS-2$
declareImage(
bundle,
TitleAreaDialog.DLG_IMG_TITLE_BANNER,
ICONS_PATH + "title_banner.png", TitleAreaDialog.class, "images/title_banner.gif");//$NON-NLS-1$ //$NON-NLS-2$
declareImage(
bundle,
PreferenceDialog.PREF_DLG_TITLE_IMG,
ICONS_PATH + "pref_dialog_title.gif", PreferenceDialog.class, "images/pref_dialog_title.gif");//$NON-NLS-1$ //$NON-NLS-2$
declareImage(bundle, PopupDialog.POPUP_IMG_MENU, ICONS_PATH
+ "popup_menu.gif", PopupDialog.class, "images/popup_menu.gif");//$NON-NLS-1$ //$NON-NLS-2$
declareImage(
bundle,
PopupDialog.POPUP_IMG_MENU_DISABLED,
ICONS_PATH + "popup_menu_disabled.gif", PopupDialog.class, "images/popup_menu_disabled.gif");//$NON-NLS-1$ //$NON-NLS-2$
}
示例6: doubleClick
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
@Override
public void doubleClick(DoubleClickEvent event)
{
CommandNode node = getSelectedNode();
if (node == null) return;
CommandDialog dialog = new CommandDialog(FlowEditor.this, node.getCommand());
int result = dialog.open();
if (result == TitleAreaDialog.OK)
{
// System.out.println("Command erstellt: " + dialog.getCommand());
viewer.refresh();
setDirty(true);
}
}
示例7: execute
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException{
Patient sp = ElexisEventDispatcher.getSelectedPatient();
if(sp==null) {
return null;
}
SupplementVaccinationDialog svd = new SupplementVaccinationDialog(UiDesk.getTopShell(), sp);
int retVal = svd.open();
if (retVal == TitleAreaDialog.OK) {
String patientId = sp.getId();
String administratorString = svd.getAdministratorString();
String lotNo = svd.getLotNo();
TimeTool doa = svd.getDateOfAdministration();
String articleString = svd.getArticleString();
Artikel art = (Artikel) new PersistentObjectFactory().createFromString(articleString);
if (art != null) {
new Vaccination(patientId, art, doa.getTime(), lotNo, administratorString);
} else {
Vaccination v =
new Vaccination(patientId, null, articleString, null, null, doa.getTime(),
lotNo, administratorString);
v.setVaccAgainst(svd.getVaccAgainst());
}
logger.debug("Supplement vaccination: " + articleString + " added");
}
return null;
}
示例8: getDialog
import org.eclipse.jface.dialogs.TitleAreaDialog; //导入依赖的package包/类
protected TitleAreaDialog getDialog( )
{
return dialog;
}