Examples of DialogFactory


Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

                                                      final String[] names,
                                                      final Object[] values) {
       
        final Frame dialogParent = fDialogParent;

        return new DialogFactory() {   
            public Window createDialog(MTextPanel textPanel) {
                return new ObjectDialog(dialogParent,
                                        dialogTitle,
                                        dialogMessage,
                                        textPanel,
View Full Code Here

Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

                                                      final Object key,
                                                      final boolean character) {
       
        final Frame dialogParent = fDialogParent;
           
        return new DialogFactory() {
            public Window createDialog(MTextPanel textPanel) {
                return new NumberDialog(dialogParent,
                                        dialogTitle,
                                        dialogMessage,
                                        textPanel,
View Full Code Here

Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

        };
    }   
   
    protected DialogFactory createAboutDialogFactory() {
       
        return new DialogFactory() {
            public Window createDialog(MTextPanel textPanel) {
                String title = ResourceUtils.getResourceString(FrameResources.ABOUT_TITLE);
                return new MessageDialog(title, AboutText.getAboutText());
            }
        };
View Full Code Here

Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

                                MenuItemSet.CHARACTER).setTextPanel(fTextPanel);
           
        if (fDialogParent != null) {
            String dialogTitle = ResourceUtils.getResourceString(FrameResources.SET_SIZE_TITLE);
            String dialogText = ResourceUtils.getResourceString(FrameResources.SET_SIZE_LABEL);
            DialogFactory factory = createNumberDialogFactory(dialogTitle,
                                                              dialogText,
                                                              TextAttribute.SIZE,
                                                              MenuItemSet.CHARACTER);
                                                             
            new DialogItem(ResourceUtils.getMenuData(FrameResources.OTHER_DIALOG),
View Full Code Here

Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

           
            String[] fonts = FontList.getFontList();
            String title = ResourceUtils.getResourceString(FrameResources.SET_FONT_TITLE);
            String label = ResourceUtils.getResourceString(FrameResources.SET_FONT_LABEL);
           
            DialogFactory fontF = createObjectDialogFactory(title,
                                                            label,
                                                            TextAttribute.FAMILY,
                                                            StyleMenuItemSet.CHARACTER,
                                                            fonts,
                                                            fonts);
            new DialogItem(ResourceUtils.getMenuData(FrameResources.FONT_DIALOG),
                                    fontF).setTextPanel(fTextPanel);

            DialogFactory foregroundF = createColorDialogFactory(true);
            DialogFactory backgroundF = createColorDialogFactory(false);
           
            new DialogItem(ResourceUtils.getMenuData(FrameResources.FORECOLOR_DIALOG),
                                    foregroundF).setTextPanel(fTextPanel);
            new DialogItem(ResourceUtils.getMenuData(FrameResources.BACKCOLOR_DIALOG),
                                    backgroundF).setTextPanel(fTextPanel);
View Full Code Here

Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

                                                      final String[] names,
                                                      final Object[] values) {
       
        final Frame dialogParent = fDialogParent;

        return new DialogFactory() {   
            public Window createDialog(MTextPanel textPanel) {
                return new JObjectDialog(dialogParent,
                                        dialogTitle,
                                        dialogMessage,
                                        textPanel,
View Full Code Here

Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

                                                      final boolean character) {
       
        final Frame dialogParent = fDialogParent;
        // variable not used final MTextPanel textPanel = fTextPanel;
           
        return new DialogFactory() {
            public Window createDialog(MTextPanel fTxtPanel) {
                return new JNumberDialog(dialogParent,
                                         dialogTitle,
                                         dialogMessage,
                                         fTxtPanel,
View Full Code Here

Examples of com.ibm.richtext.uiimpl.DialogItem.DialogFactory

        };
    }   
   
    protected DialogFactory createAboutDialogFactory() {
       
        return new DialogFactory() {
            public Window createDialog(MTextPanel textPanel) {
                String title = ResourceUtils.getResourceString(FrameResources.ABOUT_TITLE);
                return new JMessageDialog(title, AboutText.getAboutText());
            }
        };
View Full Code Here

Examples of com.sun.star.script.framework.browse.DialogFactory

                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    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

                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
                    }
                }
                else {
                    newName = (String) AnyConverter.toString(aParams[0]);
                }

                if ( newName == null || newName.equals(""))
                {
                    result =  new Any(new Type(Boolean.class), Boolean.FALSE);
                }
                else
                {
                    String source = new String(provider.getScriptEditor().getTemplate().getBytes());
                    String languageName = newName + "." + provider.getScriptEditor().getExtension();
                    String language = container.getLanguage();

                    ScriptEntry entry = new ScriptEntry( language, languageName, languageName, "", new HashMap() );

                    Parcel parcel = (Parcel)container.getByName( getName() );
                    ScriptMetaData data = new ScriptMetaData( parcel, entry, source );
                    parcel.insertByName( languageName, data );

                    ScriptBrowseNode sbn = new ScriptBrowseNode( provider, parcel, languageName );

          if(browsenodes==null)
          {
              LogUtils.DEBUG("browsenodes null!!");
              browsenodes = new ArrayList(4);
          }
                    browsenodes.add(sbn);
                                                                               
                    result = new Any(new Type(XBrowseNode.class), sbn);
                }
            }
            catch (Exception e)
            {
    LogUtils.DEBUG("ParcelBrowseNode[create] failed with: " + e );
                LogUtils.DEBUG( LogUtils.getTrace( e ) );
                result = new Any(new Type(Boolean.class), Boolean.FALSE);

                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error creating script: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Deletable"))
        {
            try
            {
                if ( container.deleteParcel(getName()) )
                {
                    result = new Any(new Type(Boolean.class), Boolean.TRUE);
                }
                else
                {
                    result = new Any(new Type(Boolean.class), Boolean.FALSE);
                }
            }
            catch (Exception e)
            {
                result =  new Any(new Type(Boolean.class), Boolean.FALSE);
                                                                               
                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error deleting parcel: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Renamable"))
        {
            String newName = null;
            try
            {

                if (aParams == null || aParams.length < 1 ||
                    AnyConverter.isString(aParams[0]) == false)
                {
                    String prompt = "Enter new name for Library";
                    String title = "Rename Library";
                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    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
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.