本文整理匯總了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;
}