incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1236486 [21/43] - in /incubator/ooo/devtools/netbeansintegration: ./ build/ build/public-package-jars/ javahelp/ javahelp/org/ javahelp/org/openoffice/ javahelp/org/openoffice/extensions/ javahelp/org/openoffice/extensions/docs/ javahelp/o...
Date Fri, 27 Jan 2012 01:29:58 GMT
Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SeparatorElement.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SeparatorElement.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SeparatorElement.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SeparatorElement.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: SeparatorElement.java,v $
+ *
+ *  $Revision: 1.4 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/05/03 09:53:36 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.projecttemplates.addon.datamodel;
+
+import java.beans.PropertyChangeListener;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+
+/**
+ *
+ * @author sg128468
+ */
+public class SeparatorElement implements NbNodeObject {
+
+    private NbNodeObject parent;
+
+    private BaseAction baseActions;
+    private String name;
+    private String displayName;
+    
+    /** Creates a new instance of SeparatorElement */
+    public SeparatorElement(NbNodeObject parent) {
+        displayName = "----------"; // NOI18N
+        name = ""; // NOI18N
+        this.parent = parent;
+    }
+
+    public NbNodeObject getParent() {
+        return parent;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+    
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+
+    public String getName() {
+        return name;
+    }
+    
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public NbNodeObject[] getAllSubObjects() {
+        return new NbNodeObject[0];
+    }
+
+    public Node.Property[] createProperties(Sheet sheet, PropertyChangeListener listener) {
+        return new Node.Property[0];
+    }
+
+    public boolean hasActions(int type) {
+        return baseActions != null;
+    }
+
+    public Action[] getActions(boolean context) {
+        return null;
+    }
+
+    public void setActions(BaseAction actions) {
+        this.baseActions = actions;
+    }
+
+    public int getType() {
+        return NbNodeObject.UI_SEPARATOR_TYPE;
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SubMenuElement.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SubMenuElement.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SubMenuElement.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/SubMenuElement.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: SubMenuElement.java,v $
+ *
+ *  $Revision: 1.8 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:21 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.projecttemplates.addon.datamodel;
+
+import java.beans.PropertyChangeListener;
+import java.util.Arrays;
+import java.util.Vector;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.projecttemplates.addon.AddOnWizardIterator;
+import org.openoffice.extensions.projecttemplates.calcaddin.AddinWizardIterator;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.OpenOfficeOrgMultiLanguageSet;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+import org.openoffice.extensions.util.datamodel.localization.LanguageDefinition;
+import org.openoffice.extensions.util.datamodel.properties.LocalizedOpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.SimpleOpenOfficeOrgProperty;
+
+/**
+ *
+ * @author sg128468
+ */
+public class SubMenuElement extends AddOn implements OpenOfficeOrgMultiLanguageSet, NbNodeObject {
+
+    private NbNodeObject parent;
+    private String name;
+    private BaseAction baseActions;
+    int selectedLanguage;
+    
+    /** Creates a new instance of SubMenuElement */
+    public SubMenuElement(String name, NbNodeObject parent) {
+        this(name, parent, new Integer[] {new Integer(LanguageDefinition.LANGUAGE_ID_en)});
+    }
+
+    /** Creates a new instance of SubMenuElement */
+    public SubMenuElement(String name, NbNodeObject parent, Integer[] languages) {
+        super(new String[]{PROPERTY_CONTAINER_DISPLAY_NAME, PROPERTY_CONTAINER_NAME});
+        this.name = name;
+        this.parent = parent;
+        selectedLanguage = -1;
+        properties[PROPERTY_Name] = new SimpleOpenOfficeOrgProperty(
+                PROPERTY_CONTAINER_NAME,
+                name,
+                "",
+                this, null); // NOI18N
+        if (languages == null || languages.length == 0) 
+            languages = new Integer[]{new Integer(LanguageDefinition.LANGUAGE_ID_en)};
+        String localizedName = "<".concat(name).concat(">"); // NOI18N
+        properties[PROPERTY_DisplayName] = new LocalizedOpenOfficeOrgProperty(
+            PROPERTY_CONTAINER_DISPLAY_NAME, 
+            localizedName, 
+            NbBundle.getMessage(AddOnWizardIterator.class, "TF_Menu_DisplayName_Tooltip"),
+            this, languages[0].intValue(), null);
+        for (int i=1; i<languages.length; i++) {
+            addLanguage(languages[i].intValue(), localizedName);
+        }
+    }
+
+    public NbNodeObject getParent() {
+        return parent;
+    }
+
+    public void setParent(NbNodeObject parent) {
+        if (parent.getType() == NbNodeObject.UI_MENU_TYPE || 
+                parent.getType() == NbNodeObject.ADDON_TYPE)
+            this.parent = parent;
+    }
+
+    public String getDisplayName() {
+        String retValue = null;
+        OpenOfficeOrgProperty prop = getProperty(this.PROPERTY_DisplayName);
+        if (prop.isLocalized()) {
+            if (selectedLanguage != -1) {
+                retValue = ((LocalizedOpenOfficeOrgProperty)prop).getValueForLanguage(selectedLanguage);
+            }
+            // fallback English...
+            if (retValue == null || retValue.length() == 0) {
+                retValue = ((LocalizedOpenOfficeOrgProperty)prop).getValueForLanguage(LanguageDefinition.LANGUAGE_ID_en);
+            }
+            // take first that comes to mind
+            boolean noValueFound = (retValue == null || retValue.length() == 0);
+            Integer[] languageIndexes = ((LocalizedOpenOfficeOrgProperty)prop).getUsedLanguageIndexes();
+            int index = 0;
+            while (languageIndexes != null && noValueFound && index < languageIndexes.length) {
+                int selected = languageIndexes[index++].intValue();
+                retValue = ((LocalizedOpenOfficeOrgProperty)prop).getValueForLanguage(selected);
+                noValueFound = (retValue == null || retValue.length() == 0);
+            }
+        }
+        return retValue==null?"":retValue; // NOI18N
+    }
+
+    public Node.Property[] createProperties(Sheet sheet, PropertyChangeListener listener) {
+        Vector<Node.Property>list = new Vector<Node.Property>();
+        list.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_Name]).createProperties(null, listener)));
+        if (sheet != null) {
+            Node.Property[]nameProp = (Node.Property[])list.toArray(new Node.Property[list.size()]);
+            Sheet.Set set = sheet.createPropertiesSet();
+            set.put(nameProp);
+            sheet.put(set);
+
+            set = sheet.createPropertiesSet();
+            set.setName(((NbNodeObject)properties[PROPERTY_DisplayName]).getDisplayName());
+            set.setDisplayName(set.getName().concat(" - ").concat( // NOI18N
+                    NbBundle.getMessage(AddinWizardIterator.class, "LB_LocalizedProperty")));
+            set.put(((NbNodeObject)properties[PROPERTY_DisplayName]).createProperties(null, listener));
+            sheet.put(set);
+        }
+        list.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_DisplayName]).createProperties(null, listener)));
+        return list.toArray(new Node.Property[list.size()]);
+    }
+
+    public boolean hasActions(int type) {
+        return baseActions != null;
+    }
+
+    public Action[] getActions(boolean context) {
+        return null;
+    }
+
+    public void setActions(BaseAction actions) {
+        this.baseActions = actions;
+    }
+
+    public int getType() {
+        return NbNodeObject.UI_MENU_TYPE;
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnChildren.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnChildren.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnChildren.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnChildren.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: AddOnChildren.java,v $
+ *
+ *  $Revision: 1.8 $
+ *
+ *  last change: $Author: jsc $ $Date: 2008/02/11 10:47:05 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+package org.openoffice.extensions.projecttemplates.addon.datamodel.node;
+
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.AddOn;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.Command;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.PropertyContainer;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgBooleanProperty;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgPropertyException;
+
+/**
+ *
+ * @author sg128468
+ */
+public class AddOnChildren extends Children.Keys<NbNodeObject> {
+
+    private boolean displayCommandProps;
+    private boolean showSeparatorIcon;
+    private String context;
+    public static final String BACK_END = "Back-End"; // NOI18N
+    public static final String ALL = "All"; // NOI18N
+
+    /**
+     * Creates a new instance of AddOnChildren
+     */
+    public AddOnChildren(boolean displayCommandProps, boolean showSeparatorIcon) {
+        this(ALL, displayCommandProps, showSeparatorIcon);
+    }
+
+    /**
+     * Creates a new instance of AddOnChildren
+     */
+    public AddOnChildren(String context, boolean displayCommandProps, boolean showSeparatorIcon) {
+        this.displayCommandProps = displayCommandProps;
+        this.showSeparatorIcon = showSeparatorIcon;
+        this.context = context;
+    }
+
+    public AddOnChildren() {
+        this(ALL, true, false);
+    }
+
+    protected Node[] createNodes(NbNodeObject nbNode) {
+        Node[] vNodes = null;
+        boolean display = getNodeDisplay(nbNode);
+        if (display) {
+            if (nbNode.getType() != NbNodeObject.ADDON_TYPE && nbNode.getType() != NbNodeObject.UI_MENU_TYPE) {
+                vNodes = new Node[]{new AddOnNode(nbNode, Children.LEAF, displayCommandProps, showSeparatorIcon)};
+            } else {
+                vNodes = new Node[]{new AddOnNode(nbNode, new AddOnChildren(context, displayCommandProps, showSeparatorIcon), displayCommandProps, showSeparatorIcon)};
+            }
+        }
+        return vNodes;
+    }
+
+    @Override
+    protected void addNotify() {
+        Node node = getNode();
+        Object o = node.getLookup().lookup(NbNodeObject.class);
+        if (o != null) {
+            NbNodeObject set = (NbNodeObject) o;
+            NbNodeObject[] objects = set.getAllSubObjects();
+            if (objects != null) {
+                setKeys(objects);
+            }
+        }
+    }
+
+    @Override
+    protected void removeNotify() {
+        setKeys(new NbNodeObject[]{});
+    }
+
+    public void update() {
+        addNotify();
+    }
+
+    /**
+     * Determine if this object's node should be displayed.
+     * @param set the object whose node may be displayed
+     * @return true if the node has to be displayed
+     */
+    private boolean getNodeDisplay(NbNodeObject set) {
+        // no need to do much for diplaying all
+        if (context.equals(ALL)) {
+            return true;
+        }
+        switch (set.getType()) {
+            // display when commands inside have the correct context
+            case NbNodeObject.ADDON_TYPE:
+            case NbNodeObject.UI_MENU_TYPE:
+                AddOn addon = (AddOn) set;
+                NbNodeObject[] commandObjects = addon.getAllCommands();
+                for (int i = 0; i < commandObjects.length; i++) {
+                    if (getCommandDisplay((Command) commandObjects[i], context)) {
+                        return true;
+                    }
+                }
+                break;
+            case NbNodeObject.UI_SEPARATOR_TYPE:
+                // must check if there are displayable objects before and after the separator
+                NbNodeObject parentObject = set.getParent();
+                AddOn parent = (AddOn) parentObject;
+                NbNodeObject[] subObjects = parent.getAllSubObjects();
+                boolean candidate = false;
+                boolean preSeparator = false;
+                for (int i = 0; i < subObjects.length; i++) {
+                    if (subObjects[i].getType() != NbNodeObject.UI_SEPARATOR_TYPE) {
+                        candidate |= getNodeDisplay(subObjects[i]);
+                    }
+                    // a valid sep is between stuff, not at start, not at end
+                    if (subObjects[i].equals(set)) {
+                        if (candidate) {
+                            preSeparator = true;
+                        }
+                        candidate = false;
+                    }
+                }
+                if (candidate && preSeparator) {
+                    return true;
+                }
+                break;
+            case NbNodeObject.FUNCTION_TYPE:
+                return getCommandDisplay((Command) set, context);
+            default:  // if display cannot be determined, do not display
+        }
+        return false;
+    }
+
+    /**
+     * Determine if this command's node should be displayed.
+     * @param command the command whose node may be displayed
+     * @return true if the command has to be displayed
+     */
+    public static boolean getCommandDisplay(Command command, String context) {
+        try {
+            if (!context.equals(BACK_END)) {
+                OpenOfficeOrgBooleanProperty boolProp = (OpenOfficeOrgBooleanProperty) command.getProperty(context);
+                if (boolProp.getValue()) {
+                    return true;
+                }
+            }
+            // this is no else: if context is false, maybe none is set
+            int count = PropertyContainer.PROPERTY_CONTAINER_CONTEXTS.length;
+            for (int j = 0; j < PropertyContainer.PROPERTY_CONTAINER_CONTEXTS.length; j++) {
+                OpenOfficeOrgBooleanProperty boolProp =
+                        (OpenOfficeOrgBooleanProperty) command.getProperty(
+                        PropertyContainer.PROPERTY_CONTAINER_CONTEXTS[j]);
+                if (!boolProp.getValue()) {
+                    // maybe none is selected: meaning "Back-End"
+                    count--;
+                }
+            }
+            if (count == 0) {
+                return true;
+            }
+        } catch (UnknownOpenOfficeOrgPropertyException ex) {
+            ex.printStackTrace();
+        }
+        return false;
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnNode.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnNode.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnNode.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnNode.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,303 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: AddOnNode.java,v $
+ *
+ *  $Revision: 1.8 $
+ *
+ *  last change: $Author: sg $ $Date: 2009/07/06 14:51:29 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.projecttemplates.addon.datamodel.node;
+
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.Image;
+import java.awt.ImageCapabilities;
+import java.awt.image.BufferedImage;
+import java.awt.image.ImageObserver;
+import java.awt.image.VolatileImage;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.Action;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.nodes.Node.Property;
+import org.openide.nodes.Sheet;
+import org.openide.util.ImageUtilities;
+import org.openide.util.lookup.Lookups;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.AddOn;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.Command;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgIconProperty;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgPropertyException;
+
+/**
+ *
+ * @author sg128468
+ */
+public class AddOnNode extends AbstractNode implements PropertyChangeListener {
+    
+    Action[] actions;
+    
+    // node has subnodes
+    public static final String METHOD_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/method.png"; // NOI18N
+    public static final String INTERFACE_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/interface.png"; // NOI18N
+    public static final String FOLDER_CLOSED_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/folder.png"; // NOI18N
+    public static final String FOLDER_OPEN_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/folderopen.png"; // NOI18N
+    private static final String SEPARATOR_ICON = 
+            "org/openoffice/extensions/projecttemplates/addon/icons/separator.gif";  // NOI18N
+    
+    boolean displayCommandProps;
+    boolean showSeparatorIcon;
+    
+    public AddOnNode(NbNodeObject obj, Children children) {
+        this (obj, children, true, false);
+    }
+
+    public AddOnNode(NbNodeObject obj, Children children, boolean displayCommandProps, boolean showSeparatorIcon) {
+        super (children, Lookups.singleton(obj));
+        if (obj.hasActions(NbNodeObject.ADDON_TYPE)) {
+            actions = obj.getActions(false);
+        }
+        this.displayCommandProps = displayCommandProps;
+        this.showSeparatorIcon = showSeparatorIcon;
+    }
+
+    public AddOnNode() {
+        super(new AddOnChildren());
+        setDisplayName ("Root"); // NOI18N
+    }
+
+    public Image getOpenedIcon (int type) {
+        return getIcon(type, true);
+    }
+
+    public Image getIcon (int type) {
+        return getIcon(type, false);
+    }    
+
+    private Image getIcon(int type, boolean opened) {
+        String icon = null;
+        NbNodeObject o = (NbNodeObject)this.getLookup().lookup(NbNodeObject.class);
+        if (o.getType() == NbNodeObject.UI_MENU_TYPE) {
+            if (opened)
+                icon = FOLDER_OPEN_ICON;
+            else 
+                icon = FOLDER_CLOSED_ICON;
+        }
+        else if (o.getType() == NbNodeObject.FUNCTION_TYPE) {
+            Image img = getIcon((Command)o);
+            if (img == null)  // fallback
+                icon = METHOD_ICON;
+            else 
+                return img; // bad: exit from within method...
+        }
+        else if (showSeparatorIcon && o.getType() == NbNodeObject.UI_SEPARATOR_TYPE) {
+            icon = SEPARATOR_ICON;
+        }
+        else {
+            return new VolatileImage() {
+                public BufferedImage getSnapshot() {
+                    return null;
+                }
+
+                public int getWidth() {
+                    return 0;
+                }
+
+                public int getHeight() {
+                    return 0;
+                }
+
+                public Graphics2D createGraphics() {
+                    return null;
+                }
+
+                public int validate(GraphicsConfiguration gc) {
+                    return VolatileImage.IMAGE_INCOMPATIBLE;
+                }
+
+                public boolean contentsLost() {
+                    return true;
+                }
+
+                public ImageCapabilities getCapabilities() {
+                    return null;
+                }
+
+                public int getWidth(ImageObserver observer) {
+                    return 0;
+                }
+
+                public int getHeight(ImageObserver observer) {
+                    return 0;
+                }
+
+                public Object getProperty(String name, ImageObserver observer) {
+                    return null;
+                }
+            };
+        }
+        return ImageUtilities.loadImage(icon);
+    }
+
+    public boolean isMenu() {
+        Object o = this.getLookup().lookup(NbNodeObject.class);
+        if (o instanceof AddOn) {
+            return true;
+        }
+        return false;
+    }
+    
+    public String getDisplayName() {
+        NbNodeObject object = (NbNodeObject)getLookup().lookup(NbNodeObject.class);
+        String displayName = object.getDisplayName();
+        if (!displayName.equals("AddOn")) { // NOI18N
+            this.fireCookieChange();  // trigger isValid function for catching equal command names
+        }
+        if (displayName.equals(super.getDisplayName())) {
+            return displayName;
+        }
+        setDisplayName(displayName);
+        return displayName;
+    }
+
+    public Action[] getActions(boolean context) {
+        if (actions == null)
+            return super.getActions(context);
+        return actions;
+    }
+    
+    /**
+     * set AddOnActions into the actions of this node, the AddOnActions
+     * are used to perform the actions available in the context menu of the node
+     */
+    public void setActions(BaseAction addonActions) {
+        if (actions != null) {
+            NbNodeObject o = (NbNodeObject)this.getLookup().lookup(NbNodeObject.class);
+            // if the object should have actions for this type, 
+            // give to it the base action class to wrap
+            if (o.hasActions(NbNodeObject.ADDON_TYPE)) {
+                // rename setActions to something less confusing?
+                o.setActions(addonActions);
+            }
+        }
+        Children c = this.getChildren();
+        if (c != null) {
+            Node[] subnodes = c.getNodes();
+            for (int i=0; i<subnodes.length; i++)
+                ((AddOnNode)subnodes[i]).setActions(addonActions);
+        }
+    }
+    
+    protected Sheet createSheet() {
+        Sheet sheet = Sheet.createDefault();
+        NbNodeObject object = (NbNodeObject)getLookup().lookup(NbNodeObject.class);
+        // create the properties in the object and let the object set them
+        if (object.getType() == NbNodeObject.FUNCTION_TYPE) {
+            Command command = (Command)object;
+            command.createProperties(sheet, this, displayCommandProps);
+        }
+        else {
+            object.createProperties(sheet, this);
+        }
+        return sheet;
+    }
+
+    public void propertyChange(PropertyChangeEvent evt) {
+        this.fireCookieChange();
+        this.fireDisplayNameChange("o", "n"); // NOI18N
+        if (this.getParentNode() != null) {
+            ((PropertyChangeListener)this.getParentNode()).propertyChange(evt);
+        }
+    }
+    
+    public void triggerChangeEvent() {
+        this.fireCookieChange();
+        this.fireDisplayNameChange("o", "n"); // NOI18N
+    }
+    
+    public void triggerLanguageChange() {
+        NbNodeObject object = (NbNodeObject)getLookup().lookup(NbNodeObject.class);
+        // create the properties in the object and let the object set them
+        // this triggers the update of the property sheet
+        Sheet newSheet = this.getSheet();
+        Property[] newSet = object.createProperties(newSheet, this); 
+        this.setSheet(newSheet);
+
+// fire property changes did not work: properties were not updated.                 
+//        PropertySet[] propset = this.getPropertySets();
+//        this.firePropertySetsChange(propset, null);
+//        for(int i=0; i<propset.length; i++) {
+//            Property[] prop = propset[i].getProperties();
+//            LogWriter.getLogWriter().log(LogWriter.LEVEL_INFO, "  " + propset[i].getDisplayName()); // NOI18N
+//            for (int j=0; j<prop.length; j++) {
+//                    LogWriter.getLogWriter().log(LogWriter.LEVEL_INFO, "    " + prop[j].getDisplayName()); // NOI18N
+//                    this.firePropertyChange(prop[j].getDisplayName(), null, ""); // NOI18N
+//                }
+//            }
+//        }
+
+        Node[] subnodes = this.getChildren().getNodes();
+        for (int i=0; i<subnodes.length; i++)
+            ((AddOnNode)subnodes[i]).triggerLanguageChange();
+    }
+    
+    private Image getIcon(Command com) {
+        String[] iconPropNames = new String[] {
+            com.PROPERTY_CONTAINER_ICON_LOWRES_SMALL,
+            com.PROPERTY_CONTAINER_ICON_LOWRES_BIG,
+            com.PROPERTY_CONTAINER_ICON_HIRES_SMALL,
+            com.PROPERTY_CONTAINER_ICON_HIRES_BIG,
+        };
+        Image img = null;
+        OpenOfficeOrgIconProperty iconProp = null;
+        try {
+            for (int i = 0; i < iconPropNames.length; i++) {
+                iconProp = (OpenOfficeOrgIconProperty)
+                    com.getProperty(iconPropNames[i]);
+                if (iconProp.getImage() != null) {
+                    img = iconProp.getImage();
+                }
+            }
+        } catch (UnknownOpenOfficeOrgPropertyException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        }
+        if (img != null)
+            return img.getScaledInstance(24, 24, Image.SCALE_FAST);
+        return null;
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnTreeCreator.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnTreeCreator.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnTreeCreator.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/node/AddOnTreeCreator.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: AddOnTreeCreator.java,v $
+ *
+ *  $Revision: 1.7 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/10/07 10:18:26 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.projecttemplates.addon.datamodel.node;
+
+import java.util.Iterator;
+import java.util.Vector;
+import org.openide.util.Exceptions;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.AddOn;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.Command;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.SubMenuElement;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgIconProperty;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgLanguageIDException;
+
+/**
+ * To handle different settings concernig toolbars and menus, the same data 
+ * structure is created for the AddOn. It is reused for basic settings of the 
+ * AddOn, for the menu structure and for the toolbar structure.
+ * This class helps with creating a new data structure for each panel.
+ */
+public class AddOnTreeCreator {
+
+    /**
+     * Creates a new instance of AddOnTreeCreator
+     */
+    private AddOnTreeCreator() {
+    }
+    
+    public static AddOnNode createInitialFunctionTree() {
+        AddOn addon = new AddOn();
+/*        SubMenuElement subElement = addon.addMenuElement(null);
+        OpenOfficeOrgProperty oooProp = subElement.getProperty(subElement.PROPERTY_DisplayName);
+        try {
+            oooProp.setValueForLanguage(LanguageDefinition.LANGUAGE_ID_en, "Top Level Menu"); // NOI18N 
+        } catch (UnknownOpenOfficeOrgLanguageIDException ex) {  // if we do not know English...
+            LogWriter.getLogWriter().printStackTrace(ex);
+        } */
+        addon.addCommand(null);
+        AddOnNode rootNode = new AddOnNode(addon, new AddOnChildren());
+        return rootNode;
+    }
+    
+    public static AddOnNode restoreMenuStructure(AddOn restepAddOn, AddOn rootAddOn) {
+        AddOn menuAddOn = new AddOn();
+        Vector<Command> markForDeletion = new Vector<Command>();
+        menuAddOn.addSetObject("Menu0", restepAddOn); // NOI18N
+        NbNodeObject[] commands = menuAddOn.getAllCommands();
+        NbNodeObject[] newFromPanel1 = rootAddOn.getAllCommands();
+        Integer[] langIndexes = null;
+        try {
+            for (int i = 0; i < newFromPanel1.length; i++) {
+                Command newCommand = (Command)newFromPanel1[i];
+                if (i == 0) {  // get current languages once for later language completion
+                    langIndexes = newCommand.getLanguages();
+                }
+                String newName = newCommand.getProperty(newCommand.PROPERTY_Name).getValueForLanguage(-1);
+                boolean mustBeAdded = true;
+                for (int j = 0; j < commands.length; j++) {
+                    Command restepCommand = (Command)commands[j];
+                    if (i == 0) { // first run: mark all for deletion
+                        markForDeletion.add(restepCommand);
+                    }
+                    String restepName = restepCommand.getProperty(restepCommand.PROPERTY_Name).getValueForLanguage(-1);
+                    // double entries are kept and must not be removed
+                    if (restepName.equals(newName)) {
+                        mustBeAdded = false;
+                        markForDeletion.remove(restepCommand);
+                        // copy relevant props from panel one into kept command
+                        copyUIProperties(newCommand, restepCommand);
+                    }
+                }
+                // entry from panel 1 is not there, add to panel two: at the end
+                if (mustBeAdded) {
+                    SubMenuElement menu = (SubMenuElement)menuAddOn.getSetObject("Menu0");
+                    menu.insertCommand(newCommand.duplicate(menu, langIndexes));
+                }
+            }
+        } catch (UnknownOpenOfficeOrgLanguageIDException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+        // delete in panel 2
+        if (markForDeletion.size() > 0) {
+            for (Iterator<Command> it = markForDeletion.iterator(); it.hasNext();) {
+                Command command = it.next();
+                // command may be in some menu structure
+                menuAddOn.removeCommandRecursively(command);
+            }
+        }
+        // handle added / deleted languages
+        handleLanguages(menuAddOn, langIndexes);
+            
+        // do not show all command props, and no icon in menus
+        return new AddOnNode(menuAddOn, new AddOnChildren(false, false), false, false);
+    }
+    
+    public static AddOnNode createMenuStructure(AddOn addOn) {
+        AddOn menuAddOn = createNewMenuAddonStructure(addOn);
+
+        // do not show all command props, and no icon in menus
+        return new AddOnNode(menuAddOn, new AddOnChildren(false, false), false, false);
+    }
+
+    private static AddOn createNewMenuAddonStructure(AddOn addOn) {
+        AddOn newAddOn = new AddOn();
+        NbNodeObject[] commands = addOn.getAllCommands();
+        SubMenuElement el = newAddOn.addMenuElement(null);
+
+        Command com = (Command)commands[0];
+        Integer[] langIndexes = com.getLanguages();
+        for (int i = 0; i < langIndexes.length; i++) {
+            newAddOn.addLanguage(langIndexes[i].intValue(), "<Dummy>"); // NOI18N
+            try {
+                el.setLocalizedProperty(SubMenuElement.PROPERTY_CONTAINER_DISPLAY_NAME, 
+                        langIndexes[i].intValue(), "<AddOn Menu>"); // NOI18N
+            } catch (UnknownOpenOfficeOrgLanguageIDException ex) {
+                ex.printStackTrace();
+            }
+        }
+        
+        for (int i=0; i<commands.length; i++) {
+            el.addSetObject("Command".concat(Integer.toString(i)),  // NOI18N
+                    ((Command)commands[i]).duplicate(el, langIndexes));
+        }
+        return newAddOn;
+    }
+    
+    /**
+     * Copy UI props from one command into another: diplay name and icons
+     * @param source source command
+     * @param target target command
+     */
+    private static void copyUIProperties(Command source, Command target) {
+        OpenOfficeOrgProperty property = source.getProperty(source.PROPERTY_DisplayName);
+        target.setProperty(target.PROPERTY_DisplayName, property);
+        OpenOfficeOrgProperty iconProp = source.getProperty(source.PROPERTY_Icon_Hires_Big);
+        target.setProperty(target.PROPERTY_Icon_Hires_Big, iconProp);
+        iconProp = source.getProperty(source.PROPERTY_Icon_Hires_Small);
+        target.setProperty(target.PROPERTY_Icon_Hires_Small, iconProp);
+        iconProp = source.getProperty(source.PROPERTY_Icon_Lowres_Big);
+        target.setProperty(target.PROPERTY_Icon_Lowres_Big, iconProp);
+        iconProp = source.getProperty(source.PROPERTY_Icon_Lowres_Small);
+        target.setProperty(target.PROPERTY_Icon_Lowres_Small, iconProp);
+        
+    }
+    
+    private static void handleLanguages(AddOn topLevelObject, Integer[] langIndexes) {
+        for (int j = 0; j < langIndexes.length; j++) {
+            if (!topLevelObject.hasLanguage(langIndexes [j])) {
+                // add language with internal defaults: null as text
+                topLevelObject.addLanguage(langIndexes[j], null);
+            }
+        }
+    }
+    
+    public static AddOnNode createToolbarStructure(NbNodeObject addOn) {
+        NbNodeObject[] commands = ((AddOn)addOn).getAllCommands();
+        SubMenuElement el = new SubMenuElement("AddOn Toolbar", null); // NOI18N
+
+        Command com = (Command)commands[0];
+        Integer[] langIndexes = com.getLanguages();
+        for (int i = 0; i < langIndexes.length; i++) {
+            el.addLanguage(langIndexes[i].intValue(), "<Dummy>"); // NOI18N
+            try {
+                el.setLocalizedProperty(SubMenuElement.PROPERTY_CONTAINER_DISPLAY_NAME, 
+                        langIndexes[i].intValue(), "<AddOn Toolbar>"); // NOI18N
+            } catch (UnknownOpenOfficeOrgLanguageIDException ex) {
+                ex.printStackTrace();
+            }
+        }
+        
+        for (int i=0; i<commands.length; i++) {
+            el.addSetObject("Command".concat(Integer.toString(i)), ((Command)commands[i]).duplicate(el, langIndexes)); // NOI18N
+        }
+        // do not show all command props but icon in toolbar
+        return new AddOnNode(el, new AddOnChildren(false, true), false, true);
+    }
+    
+    public static AddOnNode restoreToolbarStructure(AddOn restepAddOn, AddOn rootAddOn) {
+        SubMenuElement el = (SubMenuElement)restepAddOn.getSetObject("Toolbar");
+        Vector<Command> markForDeletion = new Vector<Command>();
+        NbNodeObject[] commands = el.getAllCommands();
+        NbNodeObject[] newFromPanel1 = rootAddOn.getAllCommands();
+        Integer[] langIndexes = null;
+        try {
+            for (int i = 0; i < newFromPanel1.length; i++) {
+                Command newCommand = (Command)newFromPanel1[i];
+                if (i == 0) {  // get current languages once for later language completion
+                    langIndexes = newCommand.getLanguages();
+                }
+                String newName = newCommand.getProperty(newCommand.PROPERTY_Name).getValueForLanguage(-1);
+                boolean mustBeAdded = true;
+                for (int j = 0; j < commands.length; j++) {
+                    Command restepCommand = (Command)commands[j];
+                    if (i == 0) { // first run: mark all for deletion
+                        markForDeletion.add(restepCommand);
+                    }
+                    String restepName = restepCommand.getProperty(restepCommand.PROPERTY_Name).getValueForLanguage(-1);
+                    // double entries are kept and must not be removed
+                    if (restepName.equals(newName)) {
+                        mustBeAdded = false;
+                        markForDeletion.remove(restepCommand);
+                        // copy relevant props from panel one into kept command
+                        copyUIProperties(newCommand, restepCommand);
+                    }
+                }
+                // entry from panel 1 is not there, add to panel two: at the end
+                if (mustBeAdded) {
+                    el.insertCommand(newCommand.duplicate(el, langIndexes));
+                }
+            }
+        } catch (UnknownOpenOfficeOrgLanguageIDException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+        // delete in panel 3
+        if (markForDeletion.size() > 0) {
+            for (Iterator<Command> it = markForDeletion.iterator(); it.hasNext();) {
+                Command command = it.next();
+                el.removeCommand(command);
+            }
+        }
+        // handle added / deleted languages
+        handleLanguages(el, langIndexes);
+            
+        // do not show all command props, and no icon in menus
+        return new AddOnNode(el, new AddOnChildren(false, true), false, true);
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.form
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.form?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.form (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.form Fri Jan 27 01:29:33 2012
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jScrollPane1" pref="380" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jScrollPane1" pref="278" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+      <AuxValues>
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JTree" name="jTree1">
+          <Properties>
+            <Property name="cellRenderer" type="javax.swing.tree.TreeCellRenderer" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+              <Connection code="getTreeCellRenderer()" type="code"/>
+            </Property>
+            <Property name="model" type="javax.swing.tree.TreeModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+              <Connection code="getTreeModel()" type="code"/>
+            </Property>
+            <Property name="name" type="java.lang.String" value="listOfDeletedCommands"/>
+            <Property name="rootVisible" type="boolean" value="false"/>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+  </SubComponents>
+</Form>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/dialogs/AddDeletedCommandPanel.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: AddDeletedCommandPanel.java,v $
+ *
+ *  $Revision: 1.4 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:24 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.projecttemplates.addon.dialogs;
+
+import java.awt.Component;
+import java.awt.Dialog;
+import java.awt.Image;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Enumeration;
+import java.util.Vector;
+import javax.swing.ImageIcon;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeCellRenderer;
+import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreeNode;
+import javax.swing.tree.TreeSelectionModel;
+import org.openide.DialogDescriptor;
+import org.openide.DialogDisplayer;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.projecttemplates.addon.AddOnActions;
+import org.openoffice.extensions.projecttemplates.addon.AddOnWizardIterator;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.Command;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgIconProperty;
+
+/**
+ * Dialog for re-adding previously deleted commands to a toolbar or menu.
+ */
+public class AddDeletedCommandPanel extends javax.swing.JPanel 
+        implements ActionListener {
+
+    private DialogDescriptor dialogDescriptor;
+    private Vector<Command> commands;
+    private AddOnActions actions;
+    private NbNodeObject selectedObject;
+    
+    private static final String HELP_CTX_STRING = 
+            "org.openoffice.extensions.addon.deleted.command"; // NOI18N
+
+    /** Creates new form AddDeletedCommandPanel */
+    public AddDeletedCommandPanel(AddOnActions actions) {
+        this.actions = actions;
+        this.commands = actions.getDeletedCommands();
+        
+        initComponents();
+        jTree1.getSelectionModel().setSelectionMode(
+                TreeSelectionModel.SINGLE_TREE_SELECTION);
+        jTree1.setSelectionRow(0);
+    }
+    
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+    private void initComponents() {
+        jScrollPane1 = new javax.swing.JScrollPane();
+        jTree1 = new javax.swing.JTree();
+
+        jTree1.setCellRenderer(getTreeCellRenderer());
+        jTree1.setModel(getTreeModel());
+        jTree1.setName("listOfDeletedCommands");
+        jTree1.setRootVisible(false);
+        jScrollPane1.setViewportView(jTree1);
+
+        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
+                .addContainerGap())
+        );
+    }// </editor-fold>//GEN-END:initComponents
+    
+    public static synchronized void start(final AddOnActions actions) {
+        // get the title
+        String title = NbBundle.getMessage(
+                    AddOnWizardIterator.class, "LBL_Title_AddDelCommand"); // NOI18N
+
+        AddDeletedCommandPanel basePanel = new AddDeletedCommandPanel(actions);
+        DialogDescriptor ddsc = new DialogDescriptor(basePanel, title);
+        basePanel.addDialogDescriptor(ddsc);
+        Dialog d = DialogDisplayer.getDefault().createDialog(ddsc);
+        d.setVisible(true);
+    }
+
+    private void addDialogDescriptor(DialogDescriptor ddsc) {
+        this.dialogDescriptor = ddsc;
+        dialogDescriptor.setHelpCtx(new HelpCtx(HELP_CTX_STRING));  
+        dialogDescriptor.setButtonListener(this);
+        if(commands.size() == 0)
+            dialogDescriptor.setValid(false); // set ok button invalid
+    }
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JTree jTree1;
+    // End of variables declaration//GEN-END:variables
+
+    public void actionPerformed(ActionEvent actionEvent) {
+        if (actionEvent.getActionCommand().equals("OK")) { // NOI18N
+            int[] selectedRows = jTree1.getSelectionRows();
+            if (selectedRows != null && selectedRows.length > 0) {
+                Command com = commands.get(selectedRows[0]);
+                this.actions.restoreCommand(com);
+            }
+        }
+    }
+    
+    private TreeModel getTreeModel() {
+        return new MyTreeModel(new MyTreeNode(null, -1));
+
+    }
+    
+    private TreeCellRenderer getTreeCellRenderer() {
+        return new MyRenderer();
+    }
+
+    class MyTreeModel extends DefaultTreeModel {
+        public MyTreeModel(TreeNode root) {
+            super(root, true);
+        }
+    }
+    
+    class MyTreeNode implements TreeNode {
+        TreeNode parent;
+        int index;
+        public MyTreeNode(TreeNode parent, int index) {
+            this.parent = parent;
+            this.index = index;
+        }
+        public TreeNode getChildAt(int i) {
+            return parent==null?new MyTreeNode(this, i):null;
+        }
+        public int getChildCount() {
+            if (parent == null) {
+                if (commands.size() > 0)
+                    return commands.size();
+                else
+                    return 1;
+            }
+            return 0;
+        }
+        public TreeNode getParent() {
+            return parent;
+        }
+        public int getIndex(TreeNode treeNode) {
+            if (treeNode != null)
+                return treeNode.getIndex(null);
+            return index;
+        }
+        public boolean getAllowsChildren() {
+            return parent==null?true:false;
+        }
+        public boolean isLeaf() {
+            return parent==null?false:true;
+        }
+        public Enumeration children() {
+            Vector<TreeNode>children = new Vector<TreeNode>();
+            int count = getChildCount();
+            for (int i = 0; i < count; i++) {
+                children.add(getChildAt(i));
+            }
+            return children.elements();
+        }
+    }
+    
+    class MyRenderer extends DefaultTreeCellRenderer {
+        public Component getTreeCellRendererComponent(
+                            JTree tree, Object value, boolean sel, boolean expanded,
+                            boolean leaf, int row, boolean hasFocus) {
+
+            super.getTreeCellRendererComponent(tree, value, sel, expanded, 
+                    leaf, row, hasFocus);
+            if (commands.size() != 0) {
+                if (row < commands.size()) {
+                    Command com = commands.elementAt(row);
+                    String name = com.getDisplayName();
+                    Image img = getImage(com);
+                    if (img != null) {
+                        ImageIcon icon = new ImageIcon(img.getScaledInstance(24, 24, Image.SCALE_FAST));
+                        setIcon(icon);
+                    }
+                    setText(name);
+                }
+            }
+            else {
+                setText(NbBundle.getMessage(AddOnWizardIterator.class, 
+                        "LBL_Title_NoCommandDeleted")); // NOI18N
+            }
+            return this;
+        }
+    }
+    
+    private Image getImage(Command com) {
+        if (com != null) {
+            int[] propIndexes = new int[]{
+                com.PROPERTY_Icon_Hires_Big,
+                com.PROPERTY_Icon_Hires_Small,
+                com.PROPERTY_Icon_Lowres_Big,
+                com.PROPERTY_Icon_Lowres_Small,
+            };
+            for (int i = 0; i < propIndexes.length; i++) {
+                OpenOfficeOrgIconProperty prop = (OpenOfficeOrgIconProperty)com.getProperty(propIndexes[i]);
+                if (prop != null && prop.getImage() != null) {
+                    return prop.getImage();
+                }
+            }
+        }
+        return null;
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/back.gif
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/back.gif?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/back.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/down.gif
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/down.gif?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/down.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/forward.gif
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/forward.gif?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/forward.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/separator.gif
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/separator.gif?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/separator.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/up.gif
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/up.gif?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/icons/up.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinActions.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinActions.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinActions.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinActions.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: AddinActions.java,v $
+ *
+ *  $Revision: 1.6 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/06/06 09:42:40 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.projecttemplates.calcaddin;
+
+import java.awt.Component;
+import org.openide.explorer.ExplorerManager;
+import org.openide.nodes.Node;
+import org.openoffice.extensions.projecttemplates.calcaddin.datamodel.AddIn;
+import org.openoffice.extensions.util.datamodel.Function;
+import org.openoffice.extensions.util.datamodel.properties.LocalizedOpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.Parameter;
+import org.openoffice.extensions.projecttemplates.calcaddin.datamodel.node.*;
+import org.openoffice.extensions.util.datamodel.actions.FunctionAction;
+import org.openoffice.extensions.util.datamodel.actions.LanguageAction;
+import org.openoffice.extensions.util.datamodel.actions.ParameterAction;
+
+/**
+ *
+ * @author sg128468
+ */
+public class AddinActions implements FunctionAction, ParameterAction, LanguageAction {
+
+    private ExplorerManager manager;
+    private AddinWizardPanel2Description panel;
+    
+    /**
+     * Creates a new instance of AddinActions
+     */
+    public AddinActions(ExplorerManager manager, AddinWizardPanel2Description panel) {
+        this.manager = manager;
+        this.panel = panel;
+    }
+
+    public void deleteAction() {
+        // because of TreeSelectionModel.SINGLE_TREE_SELECTION max. one node is selected
+        Node[] selectedNodes = manager.getSelectedNodes();
+        if (selectedNodes.length > 0) {
+            Node selectedNode = selectedNodes[0];
+            NbNodeObject nodeObject = (NbNodeObject)selectedNode.getLookup().lookup(NbNodeObject.class);
+            if (nodeObject instanceof Function) {
+                Function f = (Function)nodeObject;
+                AddIn addin = (AddIn)nodeObject.getParent();
+                addin.removeFunction(f);
+                // update UI
+                AddInChildren children = (AddInChildren)selectedNode.getParentNode().getChildren(); 
+                children.update(); // updates nodes
+            }
+            else if (nodeObject instanceof Parameter) {
+                Parameter p = (Parameter)nodeObject;
+                Function f = (Function)nodeObject.getParent();
+                f.removeParameter(p);
+                Node functionNode = selectedNode.getParentNode();
+                ((AddInNode)functionNode).triggerChangeEvent(); // updates function display name
+                AddInChildren children = (AddInChildren)functionNode.getChildren();
+                children.update(); // updates nodes
+            }
+        }
+        panel.fireChangeEvent(); // Notify that the panel changed
+    }
+    
+    public void addParameterAction() {
+        // because of TreeSelectionModel.SINGLE_TREE_SELECTION max. one node is selected
+        Node[] selectedNodes = manager.getSelectedNodes();
+        if (selectedNodes.length > 0) {
+            Node selectedNode = selectedNodes[0];
+
+            // get the data object
+            NbNodeObject nodeObject = (NbNodeObject)selectedNode.getLookup().lookup(NbNodeObject.class);
+            if (nodeObject instanceof Function) {
+                Function f = (Function)nodeObject;
+                f.addParameter(nodeObject); // addParameter after
+                // update UI
+                ((AddInNode)selectedNode).triggerChangeEvent();  // updates function display name
+                AddInChildren children = (AddInChildren)selectedNode.getChildren(); 
+                children.update(); // updates nodes
+            }
+            else if (nodeObject instanceof Parameter) {
+                Function f = (Function)nodeObject.getParent();
+                f.addParameter(nodeObject); // addParameter after
+                // update UI
+                Node functionNode = selectedNode.getParentNode();
+                ((AddInNode)functionNode).triggerChangeEvent(); // updates function display name
+                AddInChildren children = (AddInChildren)functionNode.getChildren();
+                children.update(); // updates nodes
+            }
+
+        }        
+        panel.fireChangeEvent(); // Notify that the panel changed
+    }
+    
+    public void addFunctionAction() {
+        // get root node
+        AddInNode rootNode = (AddInNode)manager.getRootContext();
+        // get the data object "AddIn"
+        NbNodeObject nodeObject = (NbNodeObject)rootNode.getLookup().lookup(NbNodeObject.class);
+        AddIn addin = (AddIn)nodeObject;
+        // add function
+        addin.addFunction();
+
+        // update UI
+        AddInChildren children = (AddInChildren)rootNode.getChildren();
+        children.update();
+        panel.fireChangeEvent(); // Notify that the panel changed
+    }
+    
+    public void deleteLanguageAction() {
+        // get used languages
+        AddInNode rootNode = (AddInNode)manager.getRootContext();
+        // get the data object "AddIn"
+        NbNodeObject nodeObject = (NbNodeObject)rootNode.getLookup().lookup(NbNodeObject.class);
+        AddIn addin = (AddIn)nodeObject;
+        NbNodeObject[] subs = addin.getAllSubObjects();
+        if (subs.length > 0) {
+            Function f = (Function)subs[0];
+            LocalizedOpenOfficeOrgProperty prop = (LocalizedOpenOfficeOrgProperty)f.getProperty(f.PROPERTY_DisplayName);
+            Integer[] indexes = prop.getUsedLanguageIndexes();
+            int langID = LanguageHandlingDialog.start(true, indexes);  // delete a language
+            if (langID != -1) {
+                addin.removeLanguage(langID);
+                rootNode.triggerLanguageChange();
+                if (indexes.length == 1)  // last language deleted: trigger valid() with the change event...
+                    panel.fireChangeEvent(); // Notify that the panel changed
+            }
+        }
+    }
+    
+    public void addLanguageAction() {
+        // get used languages
+        AddInNode rootNode = (AddInNode)manager.getRootContext();
+        // get the data object "AddIn"
+        NbNodeObject nodeObject = (NbNodeObject)rootNode.getLookup().lookup(NbNodeObject.class);
+        AddIn addin = (AddIn)nodeObject;
+        NbNodeObject[] subs = addin.getAllSubObjects();
+        if (subs.length > 0) {
+            Function f = (Function)subs[0];
+            LocalizedOpenOfficeOrgProperty prop = (LocalizedOpenOfficeOrgProperty)f.getProperty(f.PROPERTY_DisplayName);
+            Integer[] indexes = prop.getUsedLanguageIndexes();
+            int langID = LanguageHandlingDialog.start(false, indexes);  // add a language
+            if (langID != -1) {
+                addin.addLanguage(langID, ""); // NOI18N
+                rootNode.triggerLanguageChange();
+                if (indexes.length == 0)  // first language added: trigger valid() with the change event...
+                    panel.fireChangeEvent(); // Notify that the panel changed
+            }
+        }
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription.html
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription.html?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription.html (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription.html Fri Jan 27 01:29:33 2012
@@ -0,0 +1,11 @@
+<html>
+    <body>
+        Creates a <b>OpenOffice.org Calc Add-In</b> project.<br>
+        Calc Add-Ins are specialized office extensions which extends <b>OpenOffice.org</b> 
+        functionality with new built-in <b>Calc Add-In</b> functions. These functions can be used directly 
+        in the normal user interface of the Spreadsheet application in OpenOffice.org.<br>
+        A wizard collects information about new Calc Add-In functions and creates a new extended J2SE 
+        class library project, generates <b>UNO IDL</b> files and generates a Java skeleton source file  
+        implementing the new Add-In functions.
+    </body>
+</html>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_ja.html
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_ja.html?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_ja.html (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_ja.html Fri Jan 27 01:29:33 2012
@@ -0,0 +1,9 @@
+<html>
+    
+<!-- Inserted by TRADOS: --><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=EUC-JP">
+<body>
+        <b>OpenOffice.org Calc ¥¢¥É¥¤¥ó</b>¥×¥í¥¸¥§¥¯¥È¤òºîÀ®¤¹¤ë¡£<br> Calc ¥¢¥É¥¤¥ó¤Ï¡¢¥ª¥Õ¥£¥¹ÍѤËÆò½¤µ¤ì¤¿³ÈÄ¥µ¡Ç½¤Ç¡¢¿·¤·¤¤ÁȤ߹þ¤ß <b>Calc ¥¢¥É¥¤¥ó´Ø¿ô</b>¤ò»ÈÍѤ·¤Æ <b>OpenOffice.org</b> µ¡Ç½¤ò³ÈÄ¥¤·¤Þ¤¹¡£¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢OpenOffice.org ɽ·×»»¥É¥­¥å¥á¥ó¥È¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÎÄ̾ï¤Î¥æ¡¼¥¶¡¼¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¡¢Ä¾ÀÜ»ÈÍѤǤ­¤Þ¤¹¡£<br> ¥¦¥£¥¶¡¼¥É¤Ë¤è¤Ã¤Æ¿·¤·¤¤ Calc ¥¢¥É¥¤¥ó´Ø¿ô¤Ë´Ø¤¹¤ë¾ðÊ󤬼ý½¸¤µ¤ì¡¢¿·¤·¤¤³ÈÄ¥ J2SE ¥¯¥é¥¹¥é¥¤¥Ö¥é¥ê¥×¥í¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢<b>UNO IDL</b> ¥Õ¥¡¥¤¥ë¤¬À¸À®¤µ¤ì¤Æ¡¢¿·¤·¤¤¥¢¥É¥¤¥ó´Ø¿ô¤ò¼ÂÁõ¤¹¤ë Java ¥¹¥±¥ë¥È¥ó¥½¡¼¥¹¥Õ¥¡¥¤¥
 ¤¬À¸À®¤µ¤ì¤Þ¤¹¡£
+    </body>
+</html>
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_pt_BR.html
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_pt_BR.html?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_pt_BR.html (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_pt_BR.html Fri Jan 27 01:29:33 2012
@@ -0,0 +1,11 @@
+<html lang='pt'>
+    <body>
+        Cria um projeto <b>Calc Add-In do OpenOffice.org</b>.<br>
+        Calc Add-Ins são extensões especializadas do office que estendem funcionalidades do <b>OpenOffice.org</b> 
+        com novas funções <b>Calc Add-In</b> embutidas. Estas funções podem ser utilizadas diretamente  
+        pela interface com o usuário normal da Planilha do OpenOffice.org.<br>
+        Um assistente coleta informações sobre as novas funções do Calc Add-Ine e cria um novo projeto de biblioteca de  
+        classe J2SE extensível, gera os arquivos <b>UNO IDL</b> e gera um arquivo esqueleto fonte em Java  
+        implementando as novas funções Add-In.
+    </body>
+</html>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_zh_CN.html
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_zh_CN.html?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_zh_CN.html (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription_zh_CN.html Fri Jan 27 01:29:33 2012
@@ -0,0 +1,8 @@
+<html lang='zh'>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
+</head>
+<body>
+´´½¨Ò»¸ö <b>OpenOffice.org Calc ²å¼þ</b>ÏîÄ¿¡£<br>Calc ²å¼þÊÇ¶Ô <b>OpenOffice.org</b> ¹¦ÄܵÄÌض¨°ì¹«Èí¼þÀ©Õ¹£¬À©Õ¹ºóµÄ OpenOffice.org ½«°üº¬ÐÂÔöµÄÄÚÖà <b>Calc ²å¼þ</b>º¯Êý¡£ÔÚ OpenOffice.org µÄµç×Ó±í¸ñÓ¦ÓóÌÐòµÄ³£¹æÓû§½çÃæÖУ¬¿ÉÒÔÖ±½ÓʹÓÃÕâЩº¯Êý¡£<br>¸ÃÏòµ¼ÊÕ¼¯ÁËÓйØÐÂÔö Calc ²å¼þº¯ÊýµÄÐÅÏ¢£¬²¢¿É´´½¨ÐµÄÀ©Õ¹ J2SE Àà¿âÏîÄ¿¡¢Éú³É <b>UNO IDL</b> Îļþ²¢Éú³ÉÓÃÓÚʵÏÖÐÂÔö²å¼þº¯ÊýµÄ Java ¿ò¼ÜÔ´Îļþ¡£
+    </body>
+</html>



Mime
View raw message