You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/01/27 02:29:58 UTC

svn commit: r1236486 [20/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...

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/AddOnWizardPanel4Toolbar.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/AddOnWizardPanel4Toolbar.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/AddOnWizardPanel4Toolbar.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/AddOnWizardPanel4Toolbar.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: AddOnWizardPanel4Toolbar.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  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;
+
+import java.awt.Component;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import org.openide.WizardDescriptor;
+import org.openide.WizardValidationException;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+
+/**
+ * Panel just asking for basic info.
+ */
+public class AddOnWizardPanel4Toolbar implements WizardDescriptor.Panel,
+        WizardDescriptor.ValidatingPanel, WizardDescriptor.FinishablePanel, AddOnActions.ActionPanel {
+    
+    private WizardDescriptor wizardDescriptor;
+    private AddOnPanelVisual4Toolbar component;
+    
+    /** Creates a new instance of templateWizardPanel */
+    public AddOnWizardPanel4Toolbar() {
+    }
+    
+    public Component getComponent() {
+        if (component == null) {
+            component = new AddOnPanelVisual4Toolbar(this);
+            component.setName(NbBundle.getMessage(AddOnWizardIterator.class, "LBL_AddOnEditor"));
+        }
+        return component;
+    }
+    
+    public HelpCtx getHelp() {
+        return new HelpCtx("org.openoffice.extensions.working.with.addons"); // NOI18N
+    }
+    
+    public boolean isValid() {
+        getComponent();
+        return component.valid(wizardDescriptor);
+    }
+    
+    private final Set<ChangeListener> listeners = new HashSet<ChangeListener>(1);
+    public final void addChangeListener(ChangeListener l) {
+        synchronized (listeners) {
+            listeners.add(l);
+        }
+    }
+    public final void removeChangeListener(ChangeListener l) {
+        synchronized (listeners) {
+            listeners.remove(l);
+        }
+    }
+    public final void fireChangeEvent() {
+        Iterator it;
+        synchronized (listeners) {
+            it = new HashSet<ChangeListener>(listeners).iterator();
+        }
+        ChangeEvent ev = new ChangeEvent(this);
+        while (it.hasNext()) {
+            ((ChangeListener) it.next()).stateChanged(ev);
+        }
+    }
+    
+    public void readSettings(Object settings) {
+        wizardDescriptor = (WizardDescriptor) settings;
+        component.read(wizardDescriptor);
+    }
+    
+    public void storeSettings(Object settings) {
+        WizardDescriptor d = (WizardDescriptor) settings;
+        component.store(d);
+    }
+    
+    public boolean isFinishPanel() {
+        return true;
+    }
+    
+    public void validate() throws WizardValidationException {
+        getComponent();
+        component.validate(wizardDescriptor);
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,145 @@
+Templates/Project/org-openoffice-extensions/AddOnProject=OpenOffice.org Add-On
+
+# wizard general
+LBL_CreateProjectStep=Define Add-On Name and Location
+LBL_UIProjectStep=Define User Commands
+LBL_UIProject=Create UI structure
+#LBL_UIProject_Menu=Create Menu structure
+#LBL_UIProject_Toolbar=Create a Toolbar structure
+LBL_UIDesign=Define the User Interface
+LBL_AddOnEditor=Define Functions and Description with Localization
+LBL_UIEditor=Define User Interface: Menus and Toolbars
+LBL_FileChooserTitle=Select Project Location
+LBL_ErrorMessageFolder="Project Name is not a valid folder name."
+LBL_ErrorMessagePath=Project Folder is not a valid path.
+LBL_ErrorMessageCreateFolder=Project Folder cannot be created.
+LBL_ErrorMessageFolderNotEmpty=Project Folder already exists and is not empty.
+
+# AddOnPanelVisual1Project
+LBL_ProjectName=Project &Name:
+LBL_MainClassName=Main &Class Name:
+LBL_JavaPackage=Java &Package:
+LBL_ProjectLoaction=Project &Location:
+LBL_ProjectFolder=Project &Folder:
+LBL_CreateMenu=Create &Menu
+LBL_CreateToolbar=Create &Toolbar
+LBL_CreatedFiles=Created Files:
+LBL_Browse=Br&owse...
+
+# AddOnPanelVisual2Description
+# button caption
+LBL_BUTTON_AddCommand=Add &Command
+LBL_BUTTON_Delete=&Delete
+LBL_BUTTON_AddSubMenu=Add &Menu
+LBL_BUTTON_AddSeparator=Add &Separator
+LBL_BUTTON_DeleteLanguage=D&elete Language...
+LBL_BUTTON_AddLanguage=&Add Language...
+# error messgaes
+LBL_ErrorMessageOneCommand=There has to be at least one command.
+LBL_ErrorMessageUniqueName=Every Command must have a unique name.
+# combo box 
+LBL_ComboBoxContext=Context:
+# button tooltips
+BUTTON_AddFunction_Tooltip=Add a new command
+BUTTON_Delete_Tooltip=Delete the selected element
+BUTTON_AddLang_Tooltip=Add a new language to all localized properties
+BUTTON_DeleteLang_Tooltip=Delete the selected language from all localized properties
+BUTTON_AddSubMenu_Tooltip=Add a new menu entry
+BUTTON_AddSeparator_Tooltip=Add a new separator in a menu structure
+BUTTON_MoveUp_Tooltip=Move the selected entry up in the structure
+BUTTON_MoveDown_Tooltip=Move the selected entry down in the structure
+
+#AddOnPanelVisual1Project tooltips
+TF_ProjectName_Tooltip=The name of the newly created project (also used as project folder name)
+TF_MainClassName_Tooltip=The name of the main implementation class
+TF_PackageName_Tooltip=The Java package name
+TF_ProjectLocation_Tooltip=The path to the directory where the project will be created
+TF_ProjectFolder_Tooltip=The final destination folder of the new project
+BUTTON_Browse_Tooltip=Select a folder where the project will be created
+
+#AddOn Menubar/Toolbat
+LBL_Preview=Preview:
+
+# Command tooltips
+TF_Command_Name_Tooltip=Internal name of the command
+TF_Command_Context_Tooltip=Context in which the command is visible
+TF_Command_Icon_Tooltip=Icon for the command
+TF_Command_DisplayName_Tooltip=Display name of the command
+TF_CommandIconHighContrastBig=High Contrast, 26x26
+TF_CommandIconHighContrastSmall=High Contrast, 16x16
+TF_CommandIconLowContrastBig=Low Contrast 26x26
+TF_CommandIconLowContrastSmall=Low Contrast 16x16
+TF_CommandErrorMessage=Parent must not be null.
+TF_IconCustomEditorErrorMessage=Image cannot be displayed.
+#Meun tooltips
+TF_Menu_DisplayName_Tooltip=Display name of the menu
+
+# IconFileChooser
+LBL_FileChooser_SupportedFiles=All Supported Image Files
+
+# add deleted command panel
+LBL_Title_AddDelCommand=Add Deleted Commands
+LBL_Title_NoCommandDeleted=No Command Deleted
+
+# file templates
+# NOI18N
+AddonTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:name=\"Addons\" oor:package=\"org.openoffice.Office\">\
+\n  <node oor:name=\"AddonUI\">\
+\n$!OfficeMenuBar!\
+\n$!OfficeToolBar!\
+\n$!Images!\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+ProtocolHandlerTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data oor:name=\"ProtocolHandler\" oor:package=\"org.openoffice.Office\" xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\
+\n  <node oor:name=\"HandlerSet\">\
+\n    <node oor:name=\"$!PackageName!.$!MainClass!\" oor:op=\"replace\">\
+\n      <prop oor:name=\"Protocols\" oor:type=\"oor:string-list\">\
+\n$!ProtocolHandlerFunctionTemplate!\
+\n      </prop>\
+\n    </node>\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+MenuBarTemplate=\
+\n    <node oor:name=\"OfficeMenuBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n        <prop oor:name="Title" oor:type="xs:string">\
+\n          <value/>\
+\n          $!MenuTitle!\
+\n        </prop>\
+\n        <prop oor:name="Target" oor:type="xs:string">\
+\n          <value>_self</value>\
+\n        </prop>\
+\n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+\n          <value/>\
+\n        </prop>\
+\n$!AddonMenuFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# NOI18N
+ToolBarTemplate=\
+\n    <node oor:name=\"OfficeToolBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n$!AddonToolbarFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# not used in toolbars?
+#\n        <prop oor:name="Title" oor:type="xs:string">\
+#\n          <value/>\
+#\n          $!ToolbarTitle!\
+#\n        </prop>\
+#\n        <prop oor:name="Target" oor:type="xs:string">\
+#\n          <value>_self</value>\
+#\n        </prop>\
+#\n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+#\n          <value/>\
+#\n        </prop>\

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_ja.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_ja.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_ja.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_ja.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,244 @@
+# Templates/Project/org-openoffice-extensions/AddOnProject=OpenOffice.org Add-On
+Templates/Project/org-openoffice-extensions/AddOnProject=OpenOffice.org \u30a2\u30c9\u30aa\u30f3
+
+# wizard general
+# LBL_CreateProjectStep=Define Add-On Name and Location
+LBL_CreateProjectStep=\u30a2\u30c9\u30aa\u30f3\u306e\u540d\u524d\u3068\u5834\u6240\u3092\u5b9a\u7fa9
+# LBL_UIProjectStep=Define User Commands
+LBL_UIProjectStep=\u30e6\u30fc\u30b6\u30fc\u30b3\u30de\u30f3\u30c9\u3092\u5b9a\u7fa9
+# LBL_UIProject=Create UI structure
+LBL_UIProject=UI \u69cb\u9020\u3092\u4f5c\u6210
+#LBL_UIProject_Menu=Create Menu structure
+#LBL_UIProject_Toolbar=Create a Toolbar structure
+# LBL_UIDesign=Define the User Interface
+LBL_UIDesign=\u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u5b9a\u7fa9
+# LBL_AddOnEditor=Define Functions and Description with Localization
+LBL_AddOnEditor=\u95a2\u6570\u3068\u30ed\u30fc\u30ab\u30ea\u30bc\u30fc\u30b7\u30e7\u30f3\u3057\u305f\u8aac\u660e\u3092\u5b9a\u7fa9
+# LBL_UIEditor=Define User Interface: Menus and Toolbars
+LBL_UIEditor=\u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u5b9a\u7fa9: \u30e1\u30cb\u30e5\u30fc\u3068\u30c4\u30fc\u30eb\u30d0\u30fc
+# LBL_FileChooserTitle=Select Project Location
+LBL_FileChooserTitle=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5834\u6240\u3092\u9078\u629e
+# LBL_ErrorMessageFolder="Project Name is not a valid folder name."
+LBL_ErrorMessageFolder=\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u304c\u6709\u52b9\u306a\u30d5\u30a9\u30eb\u30c0\u540d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u300d
+# LBL_ErrorMessagePath=Project Folder is not a valid path.
+LBL_ErrorMessagePath=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u304c\u4e0d\u6b63\u306a\u30d1\u30b9\u3067\u3059\u3002
+# LBL_ErrorMessageCreateFolder=Project Folder cannot be created.
+LBL_ErrorMessageCreateFolder=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002
+# LBL_ErrorMessageFolderNotEmpty=Project Folder already exists and is not empty.
+LBL_ErrorMessageFolderNotEmpty=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u3001\u7a7a\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+
+# AddOnPanelVisual1Project
+# LBL_ProjectName=Project &Name:
+LBL_ProjectName=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d(&N):
+# LBL_MainClassName=Main &Class Name:
+LBL_MainClassName=\u4e3b\u30af\u30e9\u30b9\u540d(&C):
+# LBL_JavaPackage=Java &Package:
+LBL_JavaPackage=Java \u30d1\u30c3\u30b1\u30fc\u30b8(&P):
+# LBL_ProjectLoaction=Project &Location:
+LBL_ProjectLoaction=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5834\u6240(&L):
+# LBL_ProjectFolder=Project &Folder:
+LBL_ProjectFolder=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0(&F):
+# LBL_CreateMenu=Create &Menu
+LBL_CreateMenu=\u30e1\u30cb\u30e5\u30fc\u3092\u4f5c\u6210(&M)
+# LBL_CreateToolbar=Create &Toolbar
+LBL_CreateToolbar=\u30c4\u30fc\u30eb\u30d0\u30fc\u3092\u4f5c\u6210(&T)
+# LBL_CreatedFiles=Created Files:
+LBL_CreatedFiles=\u4f5c\u6210\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30eb:
+# LBL_Browse=Br&owse...
+LBL_Browse=\u53c2\u7167(&O)...
+
+# AddOnPanelVisual2Description
+# button caption
+# LBL_BUTTON_AddCommand=Add &Command
+LBL_BUTTON_AddCommand=\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0(&C)
+# LBL_BUTTON_Delete=&Delete
+LBL_BUTTON_Delete=\u524a\u9664(&D)
+# LBL_BUTTON_AddSubMenu=Add &Menu
+LBL_BUTTON_AddSubMenu=\u30e1\u30cb\u30e5\u30fc\u3092\u8ffd\u52a0(&M)
+# LBL_BUTTON_AddSeparator=Add &Separator
+LBL_BUTTON_AddSeparator=\u30bb\u30d1\u30ec\u30fc\u30bf\u3092\u8ffd\u52a0(&S)
+# LBL_BUTTON_DeleteLanguage=D&elete Language...
+LBL_BUTTON_DeleteLanguage=\u8a00\u8a9e\u3092\u524a\u9664(&E)...
+# LBL_BUTTON_AddLanguage=&Add Language...
+LBL_BUTTON_AddLanguage=\u8a00\u8a9e\u3092\u8ffd\u52a0(&A)...
+# error messgaes
+# LBL_ErrorMessageOneCommand=There has to be at least one command.
+LBL_ErrorMessageOneCommand=\u5c11\u306a\u304f\u3068\u3082 1 \u3064\u4ee5\u4e0a\u306e\u30b3\u30de\u30f3\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002
+# LBL_ErrorMessageUniqueName=Every Command must have a unique name.
+LBL_ErrorMessageUniqueName=\u5404\u30b3\u30de\u30f3\u30c9\u306f\u4e00\u610f\u306e\u540d\u524d\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
+# combo box 
+# LBL_ComboBoxContext=Context:
+LBL_ComboBoxContext=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8:
+# button tooltips
+# BUTTON_AddFunction_Tooltip=Add a new command
+BUTTON_AddFunction_Tooltip=\u65b0\u3057\u3044\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0
+# BUTTON_Delete_Tooltip=Delete the selected element
+BUTTON_Delete_Tooltip=\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u524a\u9664
+# BUTTON_AddLang_Tooltip=Add a new language to all localized properties
+BUTTON_AddLang_Tooltip=\u3059\u3079\u3066\u306e\u30ed\u30fc\u30ab\u30e9\u30a4\u30ba\u3057\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u306b\u65b0\u3057\u3044\u8a00\u8a9e\u3092\u8ffd\u52a0
+# BUTTON_DeleteLang_Tooltip=Delete the selected language from all localized properties
+BUTTON_DeleteLang_Tooltip=\u3059\u3079\u3066\u306e\u30ed\u30fc\u30ab\u30e9\u30a4\u30ba\u3057\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u304b\u3089\u9078\u629e\u3057\u305f\u8a00\u8a9e\u3092\u524a\u9664
+# BUTTON_AddSubMenu_Tooltip=Add a new menu entry
+BUTTON_AddSubMenu_Tooltip=\u65b0\u3057\u3044\u30e1\u30cb\u30e5\u30fc\u30a8\u30f3\u30c8\u30ea\u3092\u8ffd\u52a0
+# BUTTON_AddSeparator_Tooltip=Add a new separator in a menu structure
+BUTTON_AddSeparator_Tooltip=\u30e1\u30cb\u30e5\u30fc\u69cb\u9020\u306b\u65b0\u3057\u3044\u30bb\u30d1\u30ec\u30fc\u30bf\u3092\u8ffd\u52a0
+# BUTTON_MoveUp_Tooltip=Move the selected entry up in the structure
+BUTTON_MoveUp_Tooltip=\u69cb\u9020\u5185\u3067\u9078\u629e\u3057\u305f\u30a8\u30f3\u30c8\u30ea\u3092\u4e0a\u3078\u79fb\u52d5
+# BUTTON_MoveDown_Tooltip=Move the selected entry down in the structure
+BUTTON_MoveDown_Tooltip=\u69cb\u9020\u5185\u3067\u9078\u629e\u3057\u305f\u30a8\u30f3\u30c8\u30ea\u3092\u4e0b\u3078\u79fb\u52d5
+
+#AddOnPanelVisual1Project tooltips
+# TF_ProjectName_Tooltip=The name of the newly created project (also used as project folder name)
+TF_ProjectName_Tooltip=\u65b0\u3057\u304f\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d (\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u540d\u3068\u3057\u3066\u3082\u4f7f\u7528)
+# TF_MainClassName_Tooltip=The name of the main implementation class
+TF_MainClassName_Tooltip=\u4e3b\u5b9f\u88c5\u30af\u30e9\u30b9\u306e\u540d\u524d
+# TF_PackageName_Tooltip=The Java package name
+TF_PackageName_Tooltip=Java \u30d1\u30c3\u30b1\u30fc\u30b8\u540d
+# TF_ProjectLocation_Tooltip=The path to the directory where the project will be created
+TF_ProjectLocation_Tooltip=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d1\u30b9
+# TF_ProjectFolder_Tooltip=The final destination folder of the new project
+TF_ProjectFolder_Tooltip=\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u6700\u7d42\u7684\u306a\u5c55\u958b\u5148\u30d5\u30a9\u30eb\u30c0
+# BUTTON_Browse_Tooltip=Select a folder where the project will be created
+BUTTON_Browse_Tooltip=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u308b\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e
+
+#AddOn Menubar/Toolbat
+# LBL_Preview=Preview:
+LBL_Preview=\u30d7\u30ec\u30d3\u30e5\u30fc:
+
+# Command tooltips
+# TF_Command_Name_Tooltip=Internal name of the command
+TF_Command_Name_Tooltip=\u30b3\u30de\u30f3\u30c9\u306e\u5185\u90e8\u540d
+# TF_Command_Context_Tooltip=Context in which the command is visible
+TF_Command_Context_Tooltip=\u30b3\u30de\u30f3\u30c9\u304c\u8868\u793a\u3055\u308c\u308b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8
+# TF_Command_Icon_Tooltip=Icon for the command
+TF_Command_Icon_Tooltip=\u30b3\u30de\u30f3\u30c9\u306e\u30a2\u30a4\u30b3\u30f3
+# TF_Command_DisplayName_Tooltip=Display name of the command
+TF_Command_DisplayName_Tooltip=\u30b3\u30de\u30f3\u30c9\u306e\u540d\u524d\u3092\u8868\u793a
+# TF_CommandIconHighContrastBig=High Contrast, 26x26
+TF_CommandIconHighContrastBig=\u9ad8\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u300126x26
+# TF_CommandIconHighContrastSmall=High Contrast, 16x16
+TF_CommandIconHighContrastSmall=\u9ad8\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u300116x16
+# TF_CommandIconLowContrastBig=Low Contrast 26x26
+TF_CommandIconLowContrastBig=\u4f4e\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8 26x26
+# TF_CommandIconLowContrastSmall=Low Contrast 16x16
+TF_CommandIconLowContrastSmall=\u4f4e\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8 16x16
+# TF_CommandErrorMessage=Parent must not be null.
+TF_CommandErrorMessage=\u89aa\u304c null \u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002
+# TF_IconCustomEditorErrorMessage=Image cannot be displayed.
+TF_IconCustomEditorErrorMessage=\u30a4\u30e1\u30fc\u30b8\u304c\u8868\u793a\u3067\u304d\u307e\u305b\u3093\u3002
+#Meun tooltips
+# TF_Menu_DisplayName_Tooltip=Display name of the menu
+TF_Menu_DisplayName_Tooltip=\u30e1\u30cb\u30e5\u30fc\u306e\u540d\u524d\u3092\u8868\u793a
+
+# IconFileChooser
+# LBL_FileChooser_SupportedFiles=All Supported Image Files
+LBL_FileChooser_SupportedFiles=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb
+
+# add deleted command panel
+# LBL_Title_AddDelCommand=Add Deleted Commands
+LBL_Title_AddDelCommand=\u524a\u9664\u3057\u305f\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0
+# LBL_Title_NoCommandDeleted=No Command Deleted
+LBL_Title_NoCommandDeleted=\u524a\u9664\u3055\u308c\u305f\u30b3\u30de\u30f3\u30c9\u306f\u3042\u308a\u307e\u305b\u3093
+
+# file templates
+# NOI18N
+# AddonTemplate=\
+# <?xml version='1.0' encoding='UTF-8'?>\
+# \n$!CR!<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:name=\"Addons\" oor:package=\"org.openoffice.Office\">\
+# \n  <node oor:name=\"AddonUI\">\
+# \n$!OfficeMenuBar!\
+# \n$!OfficeToolBar!\
+# \n$!Images!\
+# \n  </node>\
+# \n</oor:component-data>
+
+AddonTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:name=\"Addons\" oor:package=\"org.openoffice.Office\">\
+\n  <node oor:name=\"AddonUI\">\
+\n$!OfficeMenuBar!\
+\n$!OfficeToolBar!\
+\n$!Images!\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+# ProtocolHandlerTemplate=\
+# <?xml version='1.0' encoding='UTF-8'?>\
+# \n$!CR!<oor:component-data oor:name=\"ProtocolHandler\" oor:package=\"org.openoffice.Office\" xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\
+# \n  <node oor:name=\"HandlerSet\">\
+# \n    <node oor:name=\"$!PackageName!.$!MainClass!\" oor:op=\"replace\">\
+# \n      <prop oor:name=\"Protocols\" oor:type=\"oor:string-list\">\
+# \n$!ProtocolHandlerFunctionTemplate!\
+# \n      </prop>\
+# \n    </node>\
+# \n  </node>\
+# \n</oor:component-data>
+
+ProtocolHandlerTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data oor:name=\"ProtocolHandler\" oor:package=\"org.openoffice.Office\" xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\
+\n  <node oor:name=\"HandlerSet\">\
+\n    <node oor:name=\"$!PackageName!.$!MainClass!\" oor:op=\"replace\">\
+\n      <prop oor:name=\"Protocols\" oor:type=\"oor:string-list\">\
+\n$!ProtocolHandlerFunctionTemplate!\
+\n      </prop>\
+\n    </node>\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+# MenuBarTemplate=\
+# \n    <node oor:name=\"OfficeMenuBar\">\
+# \n      <node oor:name="$!Protocol!" oor:op="replace">\
+# \n        <prop oor:name="Title" oor:type="xs:string">\
+# \n          <value/>\
+# \n          $!MenuTitle!\
+# \n        </prop>\
+# \n        <prop oor:name="Target" oor:type="xs:string">\
+# \n          <value>_self</value>\
+# \n        </prop>\
+# \n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+# \n          <value/>\
+# \n        </prop>\
+# \n$!AddonMenuFunctionTemplate!\
+# \n      </node>\
+# \n    </node>\
+# 
+
+MenuBarTemplate=\
+\n    <node oor:name=\"OfficeMenuBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n        <prop oor:name="Title" oor:type="xs:string">\
+\n          <value/>\
+\n          $!MenuTitle!\
+\n        </prop>\
+\n        <prop oor:name="Target" oor:type="xs:string">\
+\n          <value>_self</value>\
+\n        </prop>\
+\n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+\n          <value/>\
+\n        </prop>\
+\n$!AddonMenuFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# NOI18N
+# ToolBarTemplate=\
+# \n    <node oor:name=\"OfficeToolBar\">\
+# \n      <node oor:name="$!Protocol!" oor:op="replace">\
+# \n$!AddonToolbarFunctionTemplate!\
+# \n      </node>\
+# \n    </node>\
+# 
+
+ToolBarTemplate=\
+\n    <node oor:name=\"OfficeToolBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n$!AddonToolbarFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# not used in toolbars?
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_pt_BR.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_pt_BR.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_pt_BR.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,145 @@
+Templates/Project/org-openoffice-extensions/AddOnProject=OpenOffice.org Add-On
+
+# wizard general
+LBL_CreateProjectStep=Define Add-On Name and Location
+LBL_UIProjectStep=Define User Commands
+LBL_UIProject=Create UI structure
+#LBL_UIProject_Menu=Create Menu structure
+#LBL_UIProject_Toolbar=Create a Toolbar structure
+LBL_UIDesign=Define the User Interface
+LBL_AddOnEditor=Define Functions and Description with Localization
+LBL_UIEditor=Define User Interface: Menus and Toolbars
+LBL_FileChooserTitle=Select Project Location
+LBL_ErrorMessageFolder="Project Name is not a valid folder name."
+LBL_ErrorMessagePath=Project Folder is not a valid path.
+LBL_ErrorMessageCreateFolder=Project Folder cannot be created.
+LBL_ErrorMessageFolderNotEmpty=Project Folder already exists and is not empty.
+
+# AddOnPanelVisual1Project
+LBL_ProjectName=Project &Name:
+LBL_MainClassName=Main &Class Name:
+LBL_JavaPackage=Java &Package:
+LBL_ProjectLoaction=Project &Location:
+LBL_ProjectFolder=Project &Folder:
+LBL_CreateMenu=Create &Menu
+LBL_CreateToolbar=Create &Toolbar
+LBL_CreatedFiles=Created Files:
+LBL_Browse=Br&owse...
+
+# AddOnPanelVisual2Description
+# button caption
+LBL_BUTTON_AddCommand=Add &Command
+LBL_BUTTON_Delete=&Delete
+LBL_BUTTON_AddSubMenu=Add &Menu
+LBL_BUTTON_AddSeparator=Add &Separator
+LBL_BUTTON_DeleteLanguage=D&elete Language...
+LBL_BUTTON_AddLanguage=&Add Language...
+# error messgaes
+LBL_ErrorMessageOneCommand=There has to be at least one command.
+LBL_ErrorMessageUniqueName=Every Command must have a unique name.
+# combo box 
+LBL_ComboBoxContext=Context:
+# button tooltips
+BUTTON_AddFunction_Tooltip=Add a new command
+BUTTON_Delete_Tooltip=Delete the selected element
+BUTTON_AddLang_Tooltip=Add a new language to all localized properties
+BUTTON_DeleteLang_Tooltip=Delete the selected language from all localized properties
+BUTTON_AddSubMenu_Tooltip=Add a new menu entry
+BUTTON_AddSeparator_Tooltip=Add a new separator in a menu structure
+BUTTON_MoveUp_Tooltip=Move the selected entry up in the structure
+BUTTON_MoveDown_Tooltip=Move the selected entry down in the structure
+
+#AddOnPanelVisual1Project tooltips
+TF_ProjectName_Tooltip=The name of the newly created project (also used as project folder name)
+TF_MainClassName_Tooltip=The name of the main implementation class
+TF_PackageName_Tooltip=The Java package name
+TF_ProjectLocation_Tooltip=The path to the directory where the project will be created
+TF_ProjectFolder_Tooltip=The final destination folder of the new project
+BUTTON_Browse_Tooltip=Select a folder where the project will be created
+
+#AddOn Menubar/Toolbat
+LBL_Preview=Preview:
+
+# Command tooltips
+TF_Command_Name_Tooltip=Internal name of the command
+TF_Command_Context_Tooltip=Context in which the command is visible
+TF_Command_Icon_Tooltip=Icon for the command
+TF_Command_DisplayName_Tooltip=Display name of the command
+TF_CommandIconHighContrastBig=High Contrast, 26x26
+TF_CommandIconHighContrastSmall=High Contrast, 16x16
+TF_CommandIconLowContrastBig=Low Contrast 26x26
+TF_CommandIconLowContrastSmall=Low Contrast 16x16
+TF_CommandErrorMessage=Parent must not be null.
+TF_IconCustomEditorErrorMessage=Image cannot be displayed.
+#Meun tooltips
+TF_Menu_DisplayName_Tooltip=Display name of the menu
+
+# IconFileChooser
+LBL_FileChooser_SupportedFiles=All Supported Image Files
+
+# add deleted command panel
+LBL_Title_AddDelCommand=Add Deleted Commands
+LBL_Title_NoCommandDeleted=No Command Deleted
+
+# file templates
+# NOI18N
+AddonTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:name=\"Addons\" oor:package=\"org.openoffice.Office\">\
+\n  <node oor:name=\"AddonUI\">\
+\n$!OfficeMenuBar!\
+\n$!OfficeToolBar!\
+\n$!Images!\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+ProtocolHandlerTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data oor:name=\"ProtocolHandler\" oor:package=\"org.openoffice.Office\" xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\
+\n  <node oor:name=\"HandlerSet\">\
+\n    <node oor:name=\"$!PackageName!.$!MainClass!\" oor:op=\"replace\">\
+\n      <prop oor:name=\"Protocols\" oor:type=\"oor:string-list\">\
+\n$!ProtocolHandlerFunctionTemplate!\
+\n      </prop>\
+\n    </node>\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+MenuBarTemplate=\
+\n    <node oor:name=\"OfficeMenuBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n        <prop oor:name="Title" oor:type="xs:string">\
+\n          <value/>\
+\n          $!MenuTitle!\
+\n        </prop>\
+\n        <prop oor:name="Target" oor:type="xs:string">\
+\n          <value>_self</value>\
+\n        </prop>\
+\n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+\n          <value/>\
+\n        </prop>\
+\n$!AddonMenuFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# NOI18N
+ToolBarTemplate=\
+\n    <node oor:name=\"OfficeToolBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n$!AddonToolbarFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# not used in toolbars?
+#\n        <prop oor:name="Title" oor:type="xs:string">\
+#\n          <value/>\
+#\n          $!ToolbarTitle!\
+#\n        </prop>\
+#\n        <prop oor:name="Target" oor:type="xs:string">\
+#\n          <value>_self</value>\
+#\n        </prop>\
+#\n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+#\n          <value/>\
+#\n        </prop>\

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_zh_CN.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_zh_CN.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/Bundle_zh_CN.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,145 @@
+Templates/Project/org-openoffice-extensions/AddOnProject=OpenOffice.org \u9644\u52a0\u8f6f\u4ef6\u5305
+
+# wizard general
+LBL_CreateProjectStep=\u5b9a\u4e49\u9644\u52a0\u8f6f\u4ef6\u5305\u7684\u540d\u79f0\u548c\u4f4d\u7f6e
+LBL_UIProjectStep=\u5b9a\u4e49\u7528\u6237\u547d\u4ee4
+LBL_UIProject=\u521b\u5efa UI \u7ed3\u6784
+#LBL_UIProject_Menu=Create Menu structure
+#LBL_UIProject_Toolbar=Create a Toolbar structure
+LBL_UIDesign=\u5b9a\u4e49\u7528\u6237\u754c\u9762
+LBL_AddOnEditor=\u5b9a\u4e49\u51fd\u6570\u548c\u5305\u542b\u672c\u5730\u5316\u7684\u63cf\u8ff0
+LBL_UIEditor=\u5b9a\u4e49\u7528\u6237\u754c\u9762\uff1a\u83dc\u5355\u548c\u5de5\u5177\u680f
+LBL_FileChooserTitle=\u9009\u62e9\u9879\u76ee\u4f4d\u7f6e
+LBL_ErrorMessageFolder=\u201c\u9879\u76ee\u540d\u79f0\u4e0d\u662f\u6709\u6548\u7684\u6587\u4ef6\u5939\u540d\u79f0\u3002\u201d
+LBL_ErrorMessagePath=\u9879\u76ee\u6587\u4ef6\u5939\u4e0d\u5177\u5907\u6709\u6548\u7684\u8def\u5f84\u3002
+LBL_ErrorMessageCreateFolder=\u65e0\u6cd5\u521b\u5efa\u9879\u76ee\u6587\u4ef6\u5939\u3002
+LBL_ErrorMessageFolderNotEmpty=\u9879\u76ee\u6587\u4ef6\u5939\u5df2\u5b58\u5728\u4e14\u4e0d\u4e3a\u7a7a\u3002
+
+# AddOnPanelVisual1Project
+LBL_ProjectName=\u9879\u76ee\u540d\u79f0(&N)\uff1a
+LBL_MainClassName=\u4e3b\u7c7b\u540d(&C)\uff1a
+LBL_JavaPackage=Java \u5305(&P)\uff1a
+LBL_ProjectLoaction=\u9879\u76ee\u4f4d\u7f6e(&L)\uff1a
+LBL_ProjectFolder=\u9879\u76ee\u6587\u4ef6\u5939(&F)\uff1a
+LBL_CreateMenu=\u521b\u5efa\u83dc\u5355(&M)
+LBL_CreateToolbar=\u521b\u5efa\u5de5\u5177\u680f(&T)
+LBL_CreatedFiles=\u521b\u5efa\u7684\u6587\u4ef6\uff1a
+LBL_Browse=\u6d4f\u89c8(&O)...
+
+# AddOnPanelVisual2Description
+# button caption
+LBL_BUTTON_AddCommand=\u6dfb\u52a0\u547d\u4ee4(&C)
+LBL_BUTTON_Delete=\u5220\u9664(&D)
+LBL_BUTTON_AddSubMenu=\u6dfb\u52a0\u83dc\u5355(&M)
+LBL_BUTTON_AddSeparator=\u6dfb\u52a0\u5206\u9694\u7b26(&S)
+LBL_BUTTON_DeleteLanguage=\u5220\u9664\u8bed\u8a00(&E)...
+LBL_BUTTON_AddLanguage=\u6dfb\u52a0\u8bed\u8a00(&A)...
+# error messgaes
+LBL_ErrorMessageOneCommand=\u5fc5\u987b\u81f3\u5c11\u5177\u6709\u4e00\u4e2a\u547d\u4ee4\u3002
+LBL_ErrorMessageUniqueName=\u6bcf\u4e2a\u547d\u4ee4\u5fc5\u987b\u5177\u6709\u552f\u4e00\u7684\u540d\u79f0\u3002
+# combo box 
+LBL_ComboBoxContext=\u4e0a\u4e0b\u6587\uff1a
+# button tooltips
+BUTTON_AddFunction_Tooltip=\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u547d\u4ee4
+BUTTON_Delete_Tooltip=\u5220\u9664\u9009\u5b9a\u7684\u5143\u7d20
+BUTTON_AddLang_Tooltip=\u5728\u6240\u6709\u672c\u5730\u5316\u5c5e\u6027\u4e2d\u6dfb\u52a0\u4e00\u79cd\u65b0\u7684\u8bed\u8a00
+BUTTON_DeleteLang_Tooltip=\u4ece\u6240\u6709\u672c\u5730\u5316\u5c5e\u6027\u4e2d\u5220\u9664\u9009\u5b9a\u7684\u8bed\u8a00
+BUTTON_AddSubMenu_Tooltip=\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u83dc\u5355\u6761\u76ee
+BUTTON_AddSeparator_Tooltip=\u5728\u83dc\u5355\u7ed3\u6784\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u5206\u9694\u7b26
+BUTTON_MoveUp_Tooltip=\u5728\u7ed3\u6784\u4e2d\u4e0a\u79fb\u9009\u5b9a\u7684\u6761\u76ee
+BUTTON_MoveDown_Tooltip=\u5728\u7ed3\u6784\u4e2d\u4e0b\u79fb\u9009\u5b9a\u7684\u6761\u76ee
+
+#AddOnPanelVisual1Project tooltips
+TF_ProjectName_Tooltip=\u65b0\u5efa\u9879\u76ee\u7684\u540d\u79f0\uff08\u4e5f\u7528\u4f5c\u9879\u76ee\u6587\u4ef6\u5939\u540d\u79f0\uff09
+TF_MainClassName_Tooltip=\u4e3b\u5b9e\u73b0\u7c7b\u7684\u540d\u79f0
+TF_PackageName_Tooltip=Java \u5305\u540d
+TF_ProjectLocation_Tooltip=\u5c06\u5728\u5176\u4e2d\u521b\u5efa\u9879\u76ee\u7684\u76ee\u5f55\u8def\u5f84
+TF_ProjectFolder_Tooltip=\u65b0\u5efa\u9879\u76ee\u7684\u6700\u7ec8\u76ee\u6807\u6587\u4ef6\u5939
+BUTTON_Browse_Tooltip=\u9009\u62e9\u4e00\u4e2a\u5c06\u5728\u5176\u4e2d\u521b\u5efa\u9879\u76ee\u7684\u6587\u4ef6\u5939
+
+#AddOn Menubar/Toolbat
+LBL_Preview=\u9884\u89c8\uff1a
+
+# Command tooltips
+TF_Command_Name_Tooltip=\u547d\u4ee4\u7684\u5185\u90e8\u540d\u79f0
+TF_Command_Context_Tooltip=\u547d\u4ee4\u53ef\u89c1\u7684\u4e0a\u4e0b\u6587
+TF_Command_Icon_Tooltip=\u547d\u4ee4\u7684\u56fe\u6807
+TF_Command_DisplayName_Tooltip=\u547d\u4ee4\u7684\u663e\u793a\u540d\u79f0
+TF_CommandIconHighContrastBig=\u9ad8\u5bf9\u6bd4\u5ea6\uff0c26x26
+TF_CommandIconHighContrastSmall=\u9ad8\u5bf9\u6bd4\u5ea6\uff0c16x16
+TF_CommandIconLowContrastBig=\u4f4e\u5bf9\u6bd4\u5ea6\uff0c26x26
+TF_CommandIconLowContrastSmall=\u4f4e\u5bf9\u6bd4\u5ea6\uff0c16x16
+TF_CommandErrorMessage=\u7236\u7ea7\u4e0d\u80fd\u4e3a\u7a7a\u3002
+TF_IconCustomEditorErrorMessage=\u65e0\u6cd5\u663e\u793a\u56fe\u50cf\u3002
+#Meun tooltips
+TF_Menu_DisplayName_Tooltip=\u83dc\u5355\u7684\u663e\u793a\u540d\u79f0
+
+# IconFileChooser
+LBL_FileChooser_SupportedFiles=\u6240\u6709\u652f\u6301\u7684\u56fe\u50cf\u6587\u4ef6
+
+# add deleted command panel
+LBL_Title_AddDelCommand=\u6dfb\u52a0\u5df2\u5220\u9664\u7684\u547d\u4ee4
+LBL_Title_NoCommandDeleted=\u672a\u5220\u9664\u547d\u4ee4
+
+# file templates
+# NOI18N
+AddonTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:name=\"Addons\" oor:package=\"org.openoffice.Office\">\
+\n  <node oor:name=\"AddonUI\">\
+\n$!OfficeMenuBar!\
+\n$!OfficeToolBar!\
+\n$!Images!\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+ProtocolHandlerTemplate=\
+<?xml version='1.0' encoding='UTF-8'?>\
+\n$!CR!<oor:component-data oor:name=\"ProtocolHandler\" oor:package=\"org.openoffice.Office\" xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\
+\n  <node oor:name=\"HandlerSet\">\
+\n    <node oor:name=\"$!PackageName!.$!MainClass!\" oor:op=\"replace\">\
+\n      <prop oor:name=\"Protocols\" oor:type=\"oor:string-list\">\
+\n$!ProtocolHandlerFunctionTemplate!\
+\n      </prop>\
+\n    </node>\
+\n  </node>\
+\n</oor:component-data>
+
+# NOI18N
+MenuBarTemplate=\
+\n    <node oor:name=\"OfficeMenuBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n        <prop oor:name="Title" oor:type="xs:string">\
+\n          <value/>\
+\n          $!MenuTitle!\
+\n        </prop>\
+\n        <prop oor:name="Target" oor:type="xs:string">\
+\n          <value>_self</value>\
+\n        </prop>\
+\n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+\n          <value/>\
+\n        </prop>\
+\n$!AddonMenuFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# NOI18N
+ToolBarTemplate=\
+\n    <node oor:name=\"OfficeToolBar\">\
+\n      <node oor:name="$!Protocol!" oor:op="replace">\
+\n$!AddonToolbarFunctionTemplate!\
+\n      </node>\
+\n    </node>\
+
+# not used in toolbars?
+#\n        <prop oor:name="Title" oor:type="xs:string">\
+#\n          <value/>\
+#\n          $!ToolbarTitle!\
+#\n        </prop>\
+#\n        <prop oor:name="Target" oor:type="xs:string">\
+#\n          <value>_self</value>\
+#\n        </prop>\
+#\n        <prop oor:name="ImageIdentifier" oor:type="xs:string">\
+#\n          <value/>\
+#\n        </prop>\

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.form
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.form?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.form (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.form Fri Jan 27 01:29:33 2012
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" 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"/>
+    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,79,0,0,1,-112"/>
+  </AuxValues>
+
+  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
+</Form>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/ButtonPanel.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ButtonPanel.java,v $
+ *
+ *  $Revision: 1.6 $
+ *
+ *  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;
+
+import java.awt.Color;
+import java.awt.Image;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.SwingConstants;
+import org.openide.explorer.ExplorerManager;
+import org.openide.nodes.Node;
+import org.openide.util.ImageUtilities;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.Command;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.SeparatorElement;
+import org.openoffice.extensions.projecttemplates.addon.datamodel.node.AddOnNode;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgPropertyException;
+
+/**
+ * Panel for showing toolbar that is created for OpenOffice.
+ */
+public class ButtonPanel extends javax.swing.JPanel {
+
+    private static final String SEPARATOR_ICON = 
+            "org/openoffice/extensions/projecttemplates/addon/icons/separator.gif";  // NOI18N
+
+    // manager for nodes
+    private ExplorerManager manager;
+    // toolbar entries are shown as buttons
+    private JButton[] buttons;
+
+    private AddOnPanelVisual4Toolbar panel;
+
+    /** Creates new form ButtonPanel */
+    public ButtonPanel(AddOnPanelVisual4Toolbar panel) {
+        initComponents();
+        this.panel = panel;
+    }
+    
+    /** 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() {
+
+        setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.X_AXIS));
+
+    }// </editor-fold>//GEN-END:initComponents
+    
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    // End of variables declaration//GEN-END:variables
+    
+    public void setManager(ExplorerManager manager) throws UnknownOpenOfficeOrgPropertyException {
+        this.manager = manager;
+        buildNewList();
+    }
+
+    public void buildNewList() throws UnknownOpenOfficeOrgPropertyException {
+        this.removeAll();
+        Node rootNode = manager.getRootContext();
+        Node[] nodes = rootNode.getChildren().getNodes();
+        buttons = new JButton[nodes.length];
+        int separatorCounter = 0;
+        
+        for (int i = 0; i < nodes.length; i++) {
+            AddOnNode node = (AddOnNode)nodes[i];
+            NbNodeObject object = (NbNodeObject)node.getLookup().lookup(NbNodeObject.class);
+
+            if (object.getType() == NbNodeObject.FUNCTION_TYPE) {
+                Command com = (Command)object;
+
+                Image image = node.getIcon(com.getType());
+                ImageIcon icon = new ImageIcon(image.getScaledInstance(24, 24, Image.SCALE_FAST));
+
+                buttons[i] = new JButton(com.getDisplayName(), icon);
+                String actionCommand = com.getSimpleProperty(Command.PROPERTY_CONTAINER_NAME);
+                buttons[i].setActionCommand(actionCommand);
+            }
+            else if(object.getType() == NbNodeObject.UI_SEPARATOR_TYPE) {
+                SeparatorElement sep = (SeparatorElement)object;
+                Image image = ImageUtilities.loadImage(SEPARATOR_ICON);
+                ImageIcon icon = new ImageIcon(image);
+                buttons[i] = new JButton(" ", icon); // NOI18N
+                String name = "Sep".concat(new Integer(separatorCounter++).toString()); // NOI18N
+                sep.setName(name);
+                buttons[i].setActionCommand(name);
+            }
+            else {
+                LogWriter.getLogWriter().log(LogWriter.LEVEL_CRITICAL, 
+                        "Unknown type for button panel."); // NOI18N
+                // prevent NullPointer exception
+                buttons[i] = new JButton("unknown"); // NOI18N
+            }
+            buttons[i].setBackground(new Color(238, 238, 238));
+            buttons[i].setHorizontalTextPosition(SwingConstants.CENTER);
+            buttons[i].setVerticalTextPosition(SwingConstants.BOTTOM);
+            buttons[i].addActionListener(panel);
+            this.add(buttons[i]);
+        }
+        this.updateUI();
+    }
+    
+    public void setSelectedButton(int buttonID) {
+        if (buttonID >= 0 || buttonID < buttons.length) { 
+            buttons[buttonID].setSelected(true);
+        }
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/AddOn.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/AddOn.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/AddOn.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/AddOn.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,402 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: AddOn.java,v $
+ *
+ *  $Revision: 1.10 $
+ *
+ *  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;
+
+import java.beans.PropertyChangeListener;
+import java.util.Iterator;
+import java.util.Vector;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.datamodel.MultiLanguage;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.OpenOfficeOrgMultiLanguageSet;
+import org.openoffice.extensions.util.datamodel.OrderedContainer;
+import org.openoffice.extensions.util.datamodel.PropertyContainer;
+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.UnknownOpenOfficeOrgLanguageIDException;
+
+/**
+ *
+ * @author sg128468
+ */
+public class AddOn extends PropertyContainer implements OpenOfficeOrgMultiLanguageSet, NbNodeObject {
+    
+    private static final String MENU = "Menu"; // NOI18N
+    private static final String SEPARATOR = "Separator"; // NOI18N
+    private static final String COMMAND = "Command"; // NOI18N
+    
+    private OrderedContainer<NbNodeObject> subElements;
+    int selectedLanguage;
+
+    private String displayName;
+    
+    /** Creates a new instance of AddOn */
+    public AddOn(String[] propNames) {
+        super(propNames);
+        selectedLanguage = -1;
+        properties[PROPERTY_DisplayName] = new LocalizedOpenOfficeOrgProperty(
+            PROPERTY_CONTAINER_DISPLAY_NAME, 
+            "<Dummy>", 
+            "",
+            this, LanguageDefinition.LANGUAGE_ID_en, null); // NOI18N
+        subElements = new OrderedContainer<NbNodeObject>();
+        this.displayName = "AddOn"; // NOI18N
+    }
+
+    /** Creates a new instance of AddOn */
+    public AddOn() {
+        this(new String[]{PROPERTY_CONTAINER_DISPLAY_NAME});
+    }
+
+    public Command addCommand(NbNodeObject topObject) {
+        String number = getNextNumber(NbNodeObject.FUNCTION_TYPE);
+        String internalName = COMMAND.concat(number);
+        Integer[] indexes = getUsedLanguages(getTopObject(topObject));
+        Command command = new Command(internalName, this, indexes);
+        addSetObject(internalName, command, getPosition(topObject));
+        return command;
+    }
+
+    public void insertCommand(Command command, NbNodeObject topObject) {
+        String number = getNextNumber(NbNodeObject.FUNCTION_TYPE);
+        command.setParent(this);
+        String internalName = COMMAND.concat(number);
+        addSetObject(internalName, command, getPosition(topObject));
+    }
+    
+    public void insertCommand(Command command) {
+        insertCommand(command, null);
+    }
+
+    public NbNodeObject[] getAllCommands() {
+        return getSpecialElements(NbNodeObject.FUNCTION_TYPE);
+    }
+    
+    public boolean removeCommand(Command c) {
+        String[] names = getAllSetObjectNames();
+        for (int i=0; i<names.length; i++) {
+            if (getSetObject(names[i]).equals(c)) {
+                subElements.remove(names[i]);
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean removeCommandRecursively(Command x) {
+        // use result to exit fast when command is deleted: exists only once
+        boolean result = removeCommand(x);
+        if (result) return true;
+        NbNodeObject[] menus = getAllMenus();
+        for (int i = 0; i < menus.length; i++) {
+            AddOn addOn = (AddOn)menus[i];
+            result = addOn.removeCommandRecursively(x);
+            if (result) return true;
+        }
+        return false;
+    }
+    
+    public SubMenuElement addMenuElement(NbNodeObject topObject) {
+        String number = getNextNumber(NbNodeObject.UI_MENU_TYPE);
+        String internalName = MENU.concat(number);
+        Integer[] indexes = getUsedLanguages(getTopObject(topObject));
+        SubMenuElement menu = null;
+        if (indexes == null) {
+            menu = new SubMenuElement(internalName, this);
+        }
+        else {
+            menu = new SubMenuElement(internalName, this, indexes);
+        }
+        addSetObject(internalName, menu, getPosition(topObject));
+        return menu;
+    }
+    
+    public NbNodeObject[] getAllMenus() {
+        return getSpecialElements(NbNodeObject.UI_MENU_TYPE);
+    }
+    
+    public void removeMenuElement(SubMenuElement m) {
+        String[] names = getAllSetObjectNames();
+        for (int i=0; i<names.length; i++) {
+            if (getSetObject(names[i]).equals(m)) {
+                subElements.remove(names[i]);
+            }
+        }
+    }
+
+    public SeparatorElement addSeparatorElement(NbNodeObject topObject) {
+        String number = getNextNumber(NbNodeObject.UI_SEPARATOR_TYPE);
+        String internalName = SEPARATOR.concat(number);
+        SeparatorElement sep = new SeparatorElement(this);
+        addSetObject(internalName, sep, getPosition(topObject));
+        return sep;
+    }
+    
+    public void removeSeparatorElement(SeparatorElement sep) {
+        String[] names = getAllSetObjectNames();
+        for (int i=0; i<names.length; i++) {
+            if (getSetObject(names[i]).equals(sep)) {
+                subElements.remove(names[i]);
+            }
+        }
+    }
+    
+    private String getNextNumber(int type) {
+        int number = 0;
+        Vector<String> names = new Vector<String>();
+        int namePrefix = 0;
+        switch (type) {
+            case NbNodeObject.UI_MENU_TYPE:
+                namePrefix = MENU.length();
+                break;
+            case NbNodeObject.UI_SEPARATOR_TYPE:
+                namePrefix = SEPARATOR.length();
+                break;
+            default:
+                namePrefix = COMMAND.length();
+        }
+        NbNodeObject parent = this;
+        while (parent.getParent() != null) {
+            parent = parent.getParent();
+        }
+        AddOn parentAddon = ((AddOn)parent);
+        getSpecialElementsInternalNames(parentAddon, type, names);
+        for (Iterator<String> it = names.iterator(); it.hasNext();) {
+            try {
+                int n = Integer.parseInt(it.next().substring(namePrefix));
+                if (number <= n) {
+                    number = n + 1;
+                }
+            }
+            catch (NumberFormatException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        }
+        return String.valueOf(number);
+    }
+    
+    protected NbNodeObject[] getSpecialElements(int elementType) {
+        NbNodeObject[] objects = getAllSubObjects();
+        Vector<NbNodeObject>v = new Vector<NbNodeObject>();
+        for (int i=0; i<objects.length; i++) {
+            if (objects[i].getType() == NbNodeObject.UI_MENU_TYPE) {
+                SubMenuElement se = (SubMenuElement)objects[i];
+                NbNodeObject[] subObjects = se.getSpecialElements(elementType);
+                for (int j=0; j<subObjects.length; j++)
+                    v.add(subObjects[j]);
+            }
+            if (objects[i].getType() == elementType) {
+                v.add(objects[i]);
+            }
+        }
+        return v.toArray(new NbNodeObject[v.size()]);
+    }
+    
+    protected void getSpecialElementsInternalNames(AddOn parentAddon, int elementType, Vector<String> result) {
+        String[] names = parentAddon.getAllSetObjectNames();
+        for (int i=0; i<names.length; i++) {
+            NbNodeObject o = (NbNodeObject)parentAddon.getSetObject(names[i]);
+            int type = o.getType();
+            if (type == elementType) {
+                result.add(names[i]);
+            }
+            if (type == NbNodeObject.UI_MENU_TYPE) {
+                AddOn addon = (AddOn)o;
+                addon.getSpecialElementsInternalNames(addon, elementType, result);
+            }
+        }
+    }
+    
+    public String[] getAllSetObjectNames() {
+        return subElements.getKeysInOrder();
+    }
+
+    public Object getSetObject(String internalName) {
+        return subElements.get(internalName);
+    }
+
+    public void addSetObject(String internalName, Object setObject) {
+        subElements.put(internalName, (NbNodeObject)setObject);
+    }
+
+    public void addSetObject(String internalName, Object setObject, int position) {
+        subElements.insertElementAt(internalName, (NbNodeObject)setObject, position);
+    }
+
+    public void addLanguage(int languageID, String defaultText) {
+        NbNodeObject[] obj = getAllSubObjects();
+        for (int i=0; i<obj.length; i++) {
+            // three types of sub objects, only separator is not localized
+            if (obj[i].getType() != NbNodeObject.UI_SEPARATOR_TYPE)  
+                ((MultiLanguage)obj[i]).addLanguage(languageID, defaultText);
+        }
+        try {
+            if (defaultText == null)
+                defaultText = "<Menu>"; // NOI18N
+            // set text on name here
+            this.setLanguageWithDefaultText(languageID, defaultText);
+        } catch (UnknownOpenOfficeOrgLanguageIDException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        }
+    }
+
+    public void removeLanguage(int languageID) {
+        try {
+            super.removeLanguageAndText(languageID);
+        } catch (UnknownOpenOfficeOrgLanguageIDException ex) {
+            ex.printStackTrace();
+        }
+        NbNodeObject[] obj = getAllSubObjects();
+        for (int i=0; i<obj.length; i++) {
+            // three types of sub objects, only separator is not localized
+            if (obj[i].getType() != NbNodeObject.UI_SEPARATOR_TYPE)  
+                ((MultiLanguage)obj[i]).removeLanguage(languageID);
+        }
+    }
+
+    public boolean hasLanguage(int languageID) {
+        Integer[] indexes = getUsedLanguages(this);
+        for (int i = 0; i < indexes.length; i++) {
+            if (indexes[i].intValue() == languageID) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    public NbNodeObject getParent() {
+        return null;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+
+    public NbNodeObject[] getAllSubObjects() {
+        return (NbNodeObject[])subElements.values().toArray(new NbNodeObject[subElements.size()]);
+    }
+
+    public NbNodeObject[] getAllSubObjects(String context) {
+        return (NbNodeObject[])subElements.values().toArray(new NbNodeObject[subElements.size()]);
+    }
+
+    public Node.Property[] createProperties(Sheet sheet, PropertyChangeListener listener) {
+        return null;
+    }
+
+    public boolean hasActions(int type) {
+        return false;
+    }
+
+    public Action[] getActions(boolean context) {
+        return null;
+    }
+
+    public void setActions(BaseAction actions) {
+    }
+
+    public int getType() {
+        return NbNodeObject.ADDON_TYPE;
+    }
+    
+    public void moveUp(NbNodeObject object) {
+        int pos = subElements.getPositionFromObject(object);
+        if (pos > 0) {
+            // remove object at pos and insert it at pos - 1
+            String name = subElements.getKeyFromObject(object);
+            subElements.remove(name);
+            subElements.insertElementAt(name, object, pos - 1);
+        }
+    }
+    
+    public void moveDown(NbNodeObject object) {
+        int pos = subElements.getPositionFromObject(object);
+        if (pos < subElements.size() - 1) {
+            // remove object at pos and insert it at pos + 1
+            String name = subElements.getKeyFromObject(object);
+            subElements.remove(name);
+            subElements.insertElementAt(name, object, pos + 1);
+        }
+    }
+    
+    private int getPosition(NbNodeObject topObject) {
+        int position = 0;
+        if (topObject == null) {  // if null append
+            position = subElements.size();
+        }
+        else {
+            position = subElements.getPositionFromObject(topObject) + 1;
+        }
+        return position;
+    }
+    
+    protected NbNodeObject getTopObject(NbNodeObject object) {
+        if (object != null && object.getParent() != null) {
+            return getTopObject(object.getParent());
+        }
+        return object;
+    }
+    
+    protected Integer[] getUsedLanguages(NbNodeObject object) {
+        if (object == null) return null;
+        if (object.getType() != NbNodeObject.UI_SEPARATOR_TYPE) { // separator is not localized
+            PropertyContainer propContainer = (PropertyContainer)object;
+            OpenOfficeOrgProperty p = propContainer.getProperty(propContainer.PROPERTY_DisplayName);
+            if (p != null && p.isLocalized()) {
+                LocalizedOpenOfficeOrgProperty prop = (LocalizedOpenOfficeOrgProperty)p;
+                Integer[] indexes = prop.getUsedLanguageIndexes();
+                return indexes;
+            }
+        }
+        NbNodeObject[] subObjects = object.getAllSubObjects();
+        for (int i=0; i<subObjects.length; i++) {
+            Integer[] indexes = getUsedLanguages(subObjects[i]);
+            if (indexes != null)
+                return indexes;
+        }
+        return null;
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/Command.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/Command.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/Command.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/Command.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,303 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: Command.java,v $
+ *
+ *  $Revision: 1.11 $
+ *
+ *  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;
+
+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.LogWriter;
+import org.openoffice.extensions.util.datamodel.MultiLanguage;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.PropertyContainer;
+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.OpenOfficeOrgBooleanProperty;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgIconProperty;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.SimpleOpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgPropertyException;
+
+/**
+ *
+ */
+public class Command extends PropertyContainer implements MultiLanguage, NbNodeObject {
+    
+    int selectedLanguage;
+    
+    private NbNodeObject parent;
+    private BaseAction baseActions;
+
+    private static final String HIRES_BIG = NbBundle.getMessage(AddOnWizardIterator.class, "TF_CommandIconHighContrastBig"); // NOI18N
+    private static final String HIRES_SMALL = NbBundle.getMessage(AddOnWizardIterator.class, "TF_CommandIconHighContrastSmall"); // NOI18N
+    private static final String LOWRES_BIG = NbBundle.getMessage(AddOnWizardIterator.class, "TF_CommandIconLowContrastBig"); // NOI18N
+    private static final String LOWRES_SMALL = NbBundle.getMessage(AddOnWizardIterator.class, "TF_CommandIconLowContrastSmall"); // NOI18N
+    
+    /** Creates a new instance of Command */
+    public Command(String name, NbNodeObject parent, Integer[] languages) {
+        super(new String[]{
+            PROPERTY_CONTAINER_NAME,
+            PROPERTY_CONTAINER_DISPLAY_NAME,
+            PROPERTY_CONTAINER_CONTEXTS[0],
+            PROPERTY_CONTAINER_CONTEXTS[1],
+            PROPERTY_CONTAINER_CONTEXTS[2],
+            PROPERTY_CONTAINER_CONTEXTS[3],
+            PROPERTY_CONTAINER_CONTEXTS[4],
+            PROPERTY_CONTAINER_CONTEXTS[5],
+            PROPERTY_CONTAINER_CONTEXTS[6],
+            PROPERTY_CONTAINER_CONTEXTS[7],
+            PROPERTY_CONTAINER_CONTEXTS[8],
+            PROPERTY_CONTAINER_ICON_HIRES_BIG,
+            PROPERTY_CONTAINER_ICON_HIRES_SMALL,
+            PROPERTY_CONTAINER_ICON_LOWRES_BIG,
+            PROPERTY_CONTAINER_ICON_LOWRES_SMALL,
+        });
+        this.parent = parent;
+        selectedLanguage = -1;
+        if (languages == null || languages.length == 0) 
+            languages = new Integer[]{new Integer(LanguageDefinition.LANGUAGE_ID_en)};
+        initializeProperties(name, languages[0].intValue());
+        for (int i=1; i<languages.length; i++) {
+            String commandName = new StringBuffer("<").append(name).append(">").toString(); // NOI18N
+            addLanguage(languages[i].intValue(), commandName);
+        }
+    }
+    
+    private void initializeProperties(String name, int language) {
+        properties[PROPERTY_Name] = new SimpleOpenOfficeOrgProperty(
+                PROPERTY_CONTAINER_NAME, 
+                name, 
+                NbBundle.getMessage(AddOnWizardIterator.class, "TF_Command_Name_Tooltip"), // NOI18N
+                this, null);
+        for (int i=0; i<PROPERTY_Context.length; i++) {
+            properties[PROPERTY_Context[i]] = new OpenOfficeOrgBooleanProperty(
+                    PROPERTY_CONTAINER_CONTEXTS[i],
+                    false, 
+                    NbBundle.getMessage(AddOnWizardIterator.class, "TF_Command_Context_Tooltip"),  // NOI18N
+                    this, null);
+        }
+        // not a language property and only used in an AddOn, so create it here
+        properties[PROPERTY_Icon_Hires_Big] = new OpenOfficeOrgIconProperty(
+                PROPERTY_CONTAINER_ICON_HIRES_BIG, 
+                null, // icon path...
+                NbBundle.getMessage(AddOnWizardIterator.class, "TF_Command_Icon_Tooltip"),  // NOI18N
+                this, new IconCustomEditor());
+        properties[PROPERTY_Icon_Hires_Small] = new OpenOfficeOrgIconProperty(
+                PROPERTY_CONTAINER_ICON_HIRES_SMALL, 
+                null, // icon path...
+                NbBundle.getMessage(AddOnWizardIterator.class, "TF_Command_Icon_Tooltip"), // NOI18N
+                this, new IconCustomEditor());
+        properties[PROPERTY_Icon_Lowres_Big] = new OpenOfficeOrgIconProperty(
+                PROPERTY_CONTAINER_ICON_LOWRES_BIG, 
+                null, // icon path...
+                NbBundle.getMessage(AddOnWizardIterator.class, "TF_Command_Icon_Tooltip"), // NOI18N
+                this, new IconCustomEditor());
+        properties[PROPERTY_Icon_Lowres_Small] = new OpenOfficeOrgIconProperty(
+                PROPERTY_CONTAINER_ICON_LOWRES_SMALL, 
+                null, // icon path...
+                NbBundle.getMessage(AddOnWizardIterator.class, "TF_Command_Icon_Tooltip"), // NOI18N
+                this, new IconCustomEditor());
+        properties[PROPERTY_DisplayName] = new LocalizedOpenOfficeOrgProperty(
+                PROPERTY_CONTAINER_DISPLAY_NAME, 
+                "<".concat(name).concat(">"),  // NOI18N
+                NbBundle.getMessage(AddOnWizardIterator.class, "TF_Command_DisplayName_Tooltip"), // NOI18N
+                this, language, null);
+    }
+    
+    public NbNodeObject getParent() {
+        return parent;
+    }
+    
+    public void setParent(NbNodeObject parent) throws IllegalArgumentException {
+        if (parent == null) throw new IllegalArgumentException(NbBundle.getMessage(AddOnWizardIterator.class, "TF_CommandErrorMessage")); // NOI18N
+        this.parent = parent;
+    }
+    
+    public String getDisplayName() {
+        String retValue = null;
+        OpenOfficeOrgProperty prop = getProperty(this.PROPERTY_DisplayName);
+        if (prop.isLocalized()) {
+            // try selected language...
+            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 NbNodeObject[] getAllSubObjects() {
+        return new NbNodeObject[0];
+    }
+    
+    public Node.Property[] createProperties(Sheet sheet, PropertyChangeListener listener, boolean createCommandProps) {
+        Vector<Node.Property> v = new Vector<Node.Property>();
+        v.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_Name]).createProperties(null, listener)));
+        if (sheet != null) {
+            if (createCommandProps) {
+                Node.Property[]nameProp = (Node.Property[])v.toArray(new Node.Property[v.size()]);
+                Sheet.Set set = Sheet.createPropertiesSet();
+                set.put(nameProp);
+                sheet.put(set);
+
+                set = Sheet.createPropertiesSet();
+                set.setName("Icons"); // NOI18N
+                set.setDisplayName(set.getName());
+                set.put(((NbNodeObject)properties[PROPERTY_Icon_Hires_Big]).createProperties(null, listener));
+                set.put(((NbNodeObject)properties[PROPERTY_Icon_Hires_Small]).createProperties(null, listener));
+                set.put(((NbNodeObject)properties[PROPERTY_Icon_Lowres_Big]).createProperties(null, listener));
+                set.put(((NbNodeObject)properties[PROPERTY_Icon_Lowres_Small]).createProperties(null, listener));
+                sheet.put(set);
+
+                set = Sheet.createPropertiesSet();
+                set.setName(((NbNodeObject)properties[PROPERTY_DisplayName]).getDisplayName());
+                set.setDisplayName(set.getName().concat(" - ").concat(
+                        NbBundle.getMessage(AddinWizardIterator.class, "LB_LocalizedProperty"))); // NOI18N
+                set.put(((NbNodeObject)properties[PROPERTY_DisplayName]).createProperties(null, listener));
+                sheet.put(set);
+            }
+            else {
+                Node.Property[]nameProp = (Node.Property[])v.toArray(new Node.Property[v.size()]);
+                Sheet.Set set = Sheet.createPropertiesSet();
+                set.put(nameProp);
+                sheet.put(set);
+
+                set = Sheet.createPropertiesSet();
+                set.setName("Context"); // NOI18N
+                set.setDisplayName(set.getName());
+                for (int i = 0; i < PROPERTY_Context.length; i++) {
+                    set.put(((NbNodeObject)properties[PROPERTY_Context[i]]).createProperties(null, listener));
+                }
+                sheet.put(set);
+            }
+        }
+        if (!createCommandProps) {
+            for (int i = 0; i < PROPERTY_Context.length; i++) {
+                v.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_Context[i]]).createProperties(null, listener)));
+            }
+        }
+        else {
+            v.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_Icon_Hires_Big]).createProperties(null, listener)));
+            v.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_Icon_Hires_Small]).createProperties(null, listener)));
+            v.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_Icon_Lowres_Big]).createProperties(null, listener)));
+            v.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_Icon_Lowres_Small]).createProperties(null, listener)));
+            v.addAll(Arrays.asList(((NbNodeObject)properties[PROPERTY_DisplayName]).createProperties(null, listener)));
+        }
+        return v.toArray(new Node.Property[v.size()]);
+    }
+    
+    public Node.Property[] createProperties(Sheet sheet, PropertyChangeListener listener) {
+        return createProperties(sheet, listener, true);
+    }
+
+    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.FUNCTION_TYPE;  // not really good, but will work
+    }
+    
+    public void addLanguage(int languageID, String text) {
+        LocalizedOpenOfficeOrgProperty prop = (LocalizedOpenOfficeOrgProperty)
+                getProperty(this.PROPERTY_DisplayName);
+        if (text == null) {
+            try {
+                text = new StringBuffer("<").append(
+                        this.getSimpleProperty(
+                        this.PROPERTY_CONTAINER_NAME)).append(">").toString(); // NOI18N
+            } catch (UnknownOpenOfficeOrgPropertyException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+                text = ""; // NOI18N
+            }
+        }
+        prop.setValueForLanguage(languageID, text);
+    }
+    
+    public void removeLanguage(int languageID) {
+        LocalizedOpenOfficeOrgProperty prop = (LocalizedOpenOfficeOrgProperty)
+                getProperty(this.PROPERTY_DisplayName);
+        prop.removeValueForLanguage(languageID);
+    }
+
+    public Integer[] getLanguages() {
+        LocalizedOpenOfficeOrgProperty prop = (LocalizedOpenOfficeOrgProperty)
+                getProperty(this.PROPERTY_DisplayName);
+        return prop.getUsedLanguageIndexes();
+    }
+    
+    public Command duplicate(NbNodeObject parent, Integer[] languages) {
+        try {
+            Command c = new Command(this.getSimpleProperty(this.PROPERTY_CONTAINER_NAME), parent, languages);
+            c.setProperty(c.PROPERTY_Name, this.getProperty(this.PROPERTY_Name));
+            c.setProperty(c.PROPERTY_DisplayName, this.getProperty(this.PROPERTY_DisplayName));
+            c.setProperty(c.PROPERTY_Icon_Hires_Big, this.getProperty(this.PROPERTY_Icon_Hires_Big));
+            c.setProperty(c.PROPERTY_Icon_Hires_Small, this.getProperty(this.PROPERTY_Icon_Hires_Small));
+            c.setProperty(c.PROPERTY_Icon_Lowres_Big, this.getProperty(this.PROPERTY_Icon_Lowres_Big));
+            c.setProperty(c.PROPERTY_Icon_Lowres_Small, this.getProperty(this.PROPERTY_Icon_Lowres_Small));
+            return c;
+        } catch (UnknownOpenOfficeOrgPropertyException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        }
+        return null;
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/IconCustomEditor.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/IconCustomEditor.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/IconCustomEditor.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/addon/datamodel/IconCustomEditor.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: IconCustomEditor.java,v $
+ *
+ *  $Revision: 1.8 $
+ *
+ *  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;
+
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.awt.image.ImageObserver;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyEditorSupport;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import javax.swing.ImageIcon;
+import javax.swing.JFileChooser;
+import javax.swing.filechooser.FileFilter;
+import org.openide.explorer.propertysheet.ExPropertyEditor;
+import org.openide.explorer.propertysheet.PropertyEnv;
+import org.openide.util.Exceptions;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.config.ConfigurationSettings;
+import org.openoffice.extensions.projecttemplates.addon.AddOnWizardIterator;
+import org.openoffice.extensions.util.LogWriter;
+
+/**
+ *
+ * @author sg128468
+ */
+public class IconCustomEditor extends PropertyEditorSupport 
+            implements VetoableChangeListener, ExPropertyEditor {
+    
+    // this list must be alphabetically sorted for Arrays.binarySearch to work!
+    private static String[] approvedImageTypeExtensions = new String[] {
+        "bmp", "gif", "jpeg", "jpg", "png",
+    }; // NOI18N
+
+    private String m_text;
+    private PropertyEnv m_propertyEnv;
+    private InnerIconCustomEditor m_innerCustomEditor;
+    private String m_path;
+    
+    /** Creates new form IconCustomEditor */
+    public IconCustomEditor() {
+        m_innerCustomEditor = new InnerIconCustomEditor();
+    }
+
+    @Override
+    public Component getCustomEditor() {
+        m_innerCustomEditor.setCurrentDirectory(ConfigurationSettings.getDefaultFileChooserStartingDir());
+        return m_innerCustomEditor;
+    }
+
+    @Override
+    public boolean supportsCustomEditor() {
+        return true;
+    }
+
+    @Override
+    public boolean isPaintable() {
+        return true;
+    }
+
+    @Override
+    public void paintValue(Graphics gfx, Rectangle box) {
+        Object o = getValue();
+        Image img = null;
+        if (o instanceof Image)
+            img = (Image)o;
+
+        ImageObserver ob = new ImageObserver() {
+           public boolean imageUpdate(Image i, int infoflags,  int x, int y, int width, int height) {
+               return false;
+           }
+        };
+        Rectangle resize = calculateSize(img, box, ob);
+        if (gfx.drawImage(img, resize.x, resize.y, resize.width, resize.height, ob)) {
+            m_text = null;
+        }
+        else {
+            m_text = NbBundle.getMessage(AddOnWizardIterator.class, "TF_IconCustomEditorErrorMessage");
+        }
+    }
+
+    
+    @Override
+    public String getAsText() {
+        return m_text;
+    }
+
+    public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
+        if (PropertyEnv.PROP_STATE.equals(evt.getPropertyName())) { 
+            File f = m_innerCustomEditor.getSelectedFile();
+            try {
+                if (f != null) {
+                    if (!f.isDirectory()) { // why should it be a directory? but anyway
+                        ConfigurationSettings.storeDefaultFileChooserStartingDir(f.getParentFile());
+                    }
+                    else {
+                        ConfigurationSettings.storeDefaultFileChooserStartingDir(f);
+                    }
+
+                    String path = f.getCanonicalPath();
+                    // first load the image icon, makes obtaining the image easy
+                    ImageIcon icon = new ImageIcon(path);
+                    if (icon != null) { // store the icon and the path there
+                        m_path = path;
+                        setValue(icon.getImage()); // this triggers setValue in OOOIconProperty! -> set path first
+                    }
+                }
+            } catch (IllegalArgumentException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            } catch (IOException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        }
+    }
+
+    public void attachEnv(PropertyEnv propertyEnv) {
+        this.m_propertyEnv = propertyEnv;
+        propertyEnv.setState(PropertyEnv.STATE_NEEDS_VALIDATION);
+        propertyEnv.addVetoableChangeListener(this);
+    }
+    
+//    public static Rectangle calculateSize(Image img, Rectangle box, Rectangle minmum, ImageObserver ob) {
+//            
+//    }
+    
+    public String getPath() {
+        return m_path;
+    }
+    
+    
+    public static Rectangle calculateSize(Image img, Rectangle box, ImageObserver ob) {
+        Rectangle resized = new Rectangle(box);
+        if (img == null) return resized;
+        double scale = (double)img.getWidth(ob) / (double)img.getHeight(ob);
+        if (box.getHeight() * scale > box.getWidth()) {
+            // have to scale the height
+            int height = (int)(scale * resized.width);
+            resized.setSize(resized.width, height);
+        }
+        else {
+            // have to scale the width
+            int width = (int)(scale * resized.height);
+            resized.setSize(width, resized.height);
+        }
+        return resized;
+    }
+    
+    public class InnerIconCustomEditor extends JFileChooser {
+    
+        /** Creates a new instance of IconCustomEditor2 */
+        public InnerIconCustomEditor() {
+            super();
+            this.setControlButtonsAreShown(false);
+            this.setFileFilter(new FileFilter(){
+                public boolean accept(File f) {
+                    if (f.isDirectory()) return true;
+                    try {
+                        String name = f.getCanonicalPath();
+                        String extension = name.substring(name.lastIndexOf('.') + 1);
+                        return Arrays.binarySearch(approvedImageTypeExtensions, extension) >= 0;
+                    } catch (IOException ex) {
+                        LogWriter.getLogWriter().printStackTrace(ex);
+                    }
+                    return false;
+                }
+                public String getDescription() {
+                    return NbBundle.getMessage(AddOnWizardIterator.class, "LBL_FileChooser_SupportedFiles");
+                }
+            });
+        }
+
+        @Override
+        public File getSelectedFile() {
+            return super.getSelectedFile();
+        }
+    }
+}    
+    
\ No newline at end of file