Examples of showInputDialog()


Examples of com.sun.star.script.framework.browse.DialogFactory.showInputDialog()

                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        name = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        name = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
View Full Code Here

Examples of com.sun.star.script.framework.browse.DialogFactory.showInputDialog()

                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        name = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        name = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
View Full Code Here

Examples of com.sun.star.script.framework.browse.DialogFactory.showInputDialog()

                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
View Full Code Here

Examples of com.sun.star.script.framework.browse.DialogFactory.showInputDialog()

                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.WindowManager.showInputDialog()

        Map<String, Object> hints = new HashMap<String, Object>();
        hints.put(WindowManagerImpl.PARENT_COMPONENT, actionContext.getWindowManifestation());
        hints.put(WindowManagerImpl.OPTION_TYPE, OptionBox.YES_NO_OPTION);
        hints.put(WindowManagerImpl.MESSAGE_TYPE, OptionBox.WARNING_MESSAGE);
        hints.put(WindowManagerImpl.MESSAGE_OBJECT, buildWarningPanel(canSave, cannotSave));
        String choice = windowManager.showInputDialog(
                BUNDLE.getString("SaveWarningTitle"), //title
                "", // message - will be overridden by custom object
                options, // options
                null, // default option
                hints); // hints
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.WindowManager.showInputDialog()

            Map<String, Object> hints = new HashMap<String, Object>();
            hints.put(WindowManagerImpl.PARENT_COMPONENT, actionContext.getWindowManifestation());
            hints.put(WindowManagerImpl.OPTION_TYPE, OptionBox.YES_NO_OPTION);
            hints.put(WindowManagerImpl.MESSAGE_TYPE, OptionBox.WARNING_MESSAGE);
            hints.put(WindowManagerImpl.MESSAGE_OBJECT, buildWarningPanel(toDelete, toRemove));
            String choice = windowManager.showInputDialog(
                    WARNING, //title
                    "", // message - will be overridden by custom object
                    options, // options
                    null, // default option
                    hints); // hints
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.WindowManager.showInputDialog()

            // Some components cannot be removed safely - let the user know this
            String ok = bundle.getString("DeleteAllErrorConfirm");
            Map<String, Object> hints = new HashMap<String, Object>();
            hints.put(WindowManagerImpl.PARENT_COMPONENT, actionContext.getWindowManifestation());
            hints.put(WindowManagerImpl.MESSAGE_TYPE, OptionBox.ERROR_MESSAGE);
            windowManager.showInputDialog(
                    "ERROR: "+ WARNING, //title
                    bundle.getString("DeleteAllErrorHasDescendantsText"), // message
                    new String[] { ok }, // options
                    ok, // default option
                    hints); // hints (none)
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.WindowManager.showInputDialog()

       
        // Set up window manager to support dialog call
        // Act as though the user clicked "OK" or "Cancel" (depending on argument "confirmed")
        WindowManager mockWindowManager = Mockito.mock(WindowManager.class);
        Mockito.when(mockPlatform.getWindowManager()).thenReturn(mockWindowManager);
        Mockito.when(mockWindowManager.showInputDialog(Mockito.anyString(), Mockito.anyString(), Mockito.<Object[]>any(), Mockito.any(), Mockito.<Map<String,Object>>any())).thenAnswer(new Answer<Object>() {
            @Override
            public Object answer(InvocationOnMock invocation) throws Throwable {
                Object[] options = (Object[]) invocation.getArguments()[2];
                return confirmed ? options[0] : options[1]; // options[0] presumed to mean "OK"
            }
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.WindowManager.showInputDialog()

        Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(persistence);

        // Ensure dialog choice
        WindowManager windowing = Mockito.mock(WindowManager.class);
        Mockito.when(mockPlatform.getWindowManager()).thenReturn(windowing);
        Mockito.when(windowing.<Object>showInputDialog(
                Mockito.anyString(), Mockito.anyString(),
                Mockito.<Object[]>any(), Mockito.any(),
                Mockito.<Map<String,Object>>any()))
                .thenReturn(confirm ? "Save" : "Cancel");
       
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.WindowManager.showInputDialog()

       
        // Set up window manager to support dialog call
        // Act as though the user clicked "OK" or "Cancel" (depending on argument "confirmed")
        WindowManager mockWindowManager = Mockito.mock(WindowManager.class);
        Mockito.when(mockPlatform.getWindowManager()).thenReturn(mockWindowManager);
        Mockito.when(mockWindowManager.showInputDialog(Mockito.anyString(), Mockito.anyString(), Mockito.<Object[]>any(), Mockito.any(), Mockito.<Map<String,Object>>any())).thenAnswer(new Answer<Object>() {
            @Override
            public Object answer(InvocationOnMock invocation) throws Throwable {
                Object[] options = (Object[]) invocation.getArguments()[2];
                return confirmed ? options[0] : options[1]; // options[0] presumed to mean "OK"
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.