minor changes
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 3 Mar 2011 16:59:44 +0000 (16:59 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 3 Mar 2011 16:59:44 +0000 (16:59 +0000)
.gitattributes
doc/integration/HPOM_Integration.docx [new file with mode: 0644]
src/java/netxms-eclipse/ObjectTools/plugin.xml
src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/Columns.java [new file with mode: 0644]
src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/Filter.java

index 5eeb0aa..b8f5175 100644 (file)
@@ -31,6 +31,7 @@ contrib/startup/debian/nxagentd.in -text
 contrib/startup/debian/nxhttpd.in -text
 doc/RadenSolutions.xml -text
 doc/comparison_netxms_nnm.doc -text
+doc/integration/HPOM_Integration.docx -text
 doc/internal/build.w64 -text
 doc/internal/db_driver_api.txt -text
 doc/internal/dci_perftab.txt -text
@@ -944,6 +945,7 @@ src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/Startu
 src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/actions/OpenObjectToolsEditor.java -text
 src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/dialogs/CreateNewToolDialog.java -text
 src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/AccessControl.java -text
+src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/Columns.java -text
 src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/Filter.java -text
 src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/General.java -text
 src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/views/ObjectToolsEditor.java -text
diff --git a/doc/integration/HPOM_Integration.docx b/doc/integration/HPOM_Integration.docx
new file mode 100644 (file)
index 0000000..5c8dcdf
Binary files /dev/null and b/doc/integration/HPOM_Integration.docx differ
index df2204f..3daeb91 100644 (file)
             </instanceof>\r
          </enabledWhen>\r
       </page>\r
+      <page\r
+            class="org.netxms.ui.eclipse.objecttools.propertypages.Columns"\r
+            id="org.netxms.ui.eclipse.objecttools.propertypages.Columns#4"\r
+            name="Columns">\r
+         <enabledWhen>\r
+            <instanceof\r
+                  value="org.netxms.client.objecttools.ObjectTool">\r
+            </instanceof>\r
+         </enabledWhen>\r
+      </page>\r
    </extension>\r
 \r
 </plugin>\r
diff --git a/src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/Columns.java b/src/java/netxms-eclipse/ObjectTools/src/org/netxms/ui/eclipse/objecttools/propertypages/Columns.java
new file mode 100644 (file)
index 0000000..be85f80
--- /dev/null
@@ -0,0 +1,147 @@
+/**\r
+ * NetXMS - open source network management system\r
+ * Copyright (C) 2003-2011 Victor Kirhenshtein\r
+ *\r
+ * This program is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
+ */\r
+package org.netxms.ui.eclipse.objecttools.propertypages;\r
+\r
+import org.eclipse.jface.viewers.TableViewer;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.layout.RowData;\r
+import org.eclipse.swt.layout.RowLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.ui.dialogs.PropertyPage;\r
+import org.netxms.client.objecttools.ObjectToolDetails;\r
+import org.netxms.ui.eclipse.tools.WidgetHelper;\r
+\r
+/**\r
+ * "Columns" property page for object tool\r
+ */\r
+public class Columns extends PropertyPage\r
+{\r
+       private ObjectToolDetails objectTool;\r
+       private TableViewer viewer;\r
+       private Button buttonAdd;\r
+       private Button buttonRemove;\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.preference.PreferencePage#createControl(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public void createControl(Composite parent)\r
+       {\r
+               noDefaultAndApplyButton();\r
+               super.createControl(parent);\r
+       }\r
+       \r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       protected Control createContents(Composite parent)\r
+       {\r
+               objectTool = (ObjectToolDetails)getElement().getAdapter(ObjectToolDetails.class);\r
+\r
+               Composite dialogArea = new Composite(parent, SWT.NONE);\r
+               \r
+               GridLayout layout = new GridLayout();\r
+               layout.verticalSpacing = WidgetHelper.OUTER_SPACING;\r
+               layout.marginWidth = 0;\r
+               layout.marginHeight = 0;\r
+               dialogArea.setLayout(layout);\r
+               \r
+               viewer = new TableViewer(dialogArea, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);\r
+               GridData gd = new GridData();\r
+               gd.horizontalAlignment = SWT.FILL;\r
+               gd.grabExcessHorizontalSpace = true;\r
+               gd.verticalAlignment = SWT.FILL;\r
+               gd.grabExcessVerticalSpace = true;\r
+               viewer.getTable().setLayoutData(gd);\r
+               \r
+      Composite buttons = new Composite(dialogArea, SWT.NONE);\r
+      RowLayout buttonLayout = new RowLayout();\r
+      buttonLayout.type = SWT.HORIZONTAL;\r
+      buttonLayout.pack = false;\r
+      buttonLayout.marginWidth = 0;\r
+      buttons.setLayout(buttonLayout);\r
+      gd = new GridData();\r
+      gd.horizontalAlignment = SWT.RIGHT;\r
+      gd.verticalIndent = WidgetHelper.OUTER_SPACING - WidgetHelper.INNER_SPACING;\r
+      buttons.setLayoutData(gd);\r
+\r
+      buttonAdd = new Button(buttons, SWT.PUSH);\r
+      buttonAdd.setText("Add...");\r
+      buttonAdd.addSelectionListener(new SelectionListener() {\r
+                       @Override\r
+                       public void widgetDefaultSelected(SelectionEvent e)\r
+                       {\r
+                               widgetSelected(e);\r
+                       }\r
+\r
+                       @Override\r
+                       public void widgetSelected(SelectionEvent e)\r
+                       {\r
+                               addColumn();\r
+                       }\r
+      });\r
+      RowData rd = new RowData();\r
+      rd.width = WidgetHelper.BUTTON_WIDTH_HINT;\r
+      buttonAdd.setLayoutData(rd);\r
+               \r
+      buttonRemove = new Button(buttons, SWT.PUSH);\r
+      buttonRemove.setText("Delete");\r
+      buttonRemove.addSelectionListener(new SelectionListener() {\r
+                       @Override\r
+                       public void widgetDefaultSelected(SelectionEvent e)\r
+                       {\r
+                               widgetSelected(e);\r
+                       }\r
+\r
+                       @Override\r
+                       public void widgetSelected(SelectionEvent e)\r
+                       {\r
+                               removeColumn();\r
+                       }\r
+      });\r
+      rd = new RowData();\r
+      rd.width = WidgetHelper.BUTTON_WIDTH_HINT;\r
+      buttonRemove.setLayoutData(rd);\r
+\r
+      return dialogArea;\r
+       }\r
+\r
+       /**\r
+        * Add new column\r
+        */\r
+       private void addColumn()\r
+       {\r
+               \r
+       }\r
+       \r
+       /**\r
+        * Remove selected column(s)\r
+        */\r
+       private void removeColumn()\r
+       {\r
+               \r
+       }\r
+}\r