Java 类org.eclipse.jface.dialogs.TitleAreaDialog 实例源码

项目:SPELL    文件:StringDialog.java   
/***************************************************************************
 * 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();
}
项目:cuina    文件:FunctionListPanel.java   
@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());
        }
    }
}
项目:brainfuck    文件:NewBfFileCreationWizardPage.java   
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);
    }
项目:ChangeScribe    文件:HandlerUtil.java   
public static void openMonitorDialog(final TitleAreaDialog dialog) {
    Display.getDefault().asyncExec(new Runnable() {
        public void run() {
            dialog.create();
            dialog.open();
        }
    });
}
项目:gef-gwt    文件:JFaceResources.java   
/**
     * 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$
    }
项目:cuina    文件:FlowEditor.java   
@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);
            }
        }
项目:elexis-3-base    文件:SupplementVaccinationHandler.java   
@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;
}
项目:birt    文件:WizardBase.java   
protected TitleAreaDialog getDialog( )
{
    return dialog;
}