directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r550423 - in /directory/studio/trunk/studio-apacheds-schemaeditor: ./ resources/icons/ src/main/java/org/apache/directory/studio/apacheds/schemaeditor/ src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/
Date Mon, 25 Jun 2007 09:09:15 GMT
Author: pamarcelot
Date: Mon Jun 25 02:09:13 2007
New Revision: 550423

URL: http://svn.apache.org/viewvc?view=rev&rev=550423
Log:
Added the New Object Class Wizard.

Added:
    directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new.gif
  (with props)
    directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new_wizard.png
  (with props)
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassMandatoryAttributesPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassOptionalAttributesPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassWizard.java
Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentWizardPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml?view=diff&rev=550423&r1=550422&r2=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml Mon Jun 25 02:09:13 2007
@@ -49,5 +49,13 @@
           id="org.apache.directory.studio.apacheds.schemaeditor.wizards.NewAttributeTypeWizard"
           name="New Attribute Type"
           project="false"/>
+	<wizard
+          category="org.apache.directory.studio.apacheds.schemaeditor.newWizardCategory"
+          class="org.apache.directory.studio.apacheds.schemaeditor.view.wizards.NewObjectClassWizard"
+          hasPages="true"
+          icon="resources/icons/object_class_new.gif"
+          id="org.apache.directory.studio.apacheds.schemaeditor.wizards.NewObjectClassWizard"
+          name="New Object Class"
+          project="false"/>
  </extension>
 </plugin>

Added: directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new.gif?view=auto&rev=550423
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new_wizard.png
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new_wizard.png?view=auto&rev=550423
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/object_class_new_wizard.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java?view=diff&rev=550423&r1=550422&r2=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
Mon Jun 25 02:09:13 2007
@@ -41,6 +41,8 @@
     public static final String IMG_FOLDER_AT = "resources/icons/folder_at.gif";
     public static final String IMG_FOLDER_OC = "resources/icons/folder_oc.gif";
     public static final String IMG_OBJECT_CLASS = "resources/icons/object_class.gif";
+    public static final String IMG_OBJECT_CLASS_NEW = "resources/icons/object_class_new.gif";
+    public static final String IMG_OBJECT_CLASS_NEW_WIZARD = "resources/icons/object_class_new_wizard.png";
     public static final String IMG_SCHEMA = "resources/icons/schema.gif";
     public static final String IMG_TOOLBAR_MENU = "resources/icons/toolbar_menu.gif";
 

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentWizardPage.java?view=diff&rev=550423&r1=550422&r2=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentWizardPage.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentWizardPage.java
Mon Jun 25 02:09:13 2007
@@ -43,7 +43,7 @@
  * This class represents the Content WizardPage of the NewAttributeTypeWizard.
  * <p>
  * It is used to let the user enter content information about the
- * attribute type he wants to create (superior, usage, syntax an properties).
+ * attribute type he wants to create (superior, usage, syntax and properties).
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -55,7 +55,7 @@
      */
     protected NewAttributeTypeContentWizardPage()
     {
-        super( "Options" );
+        super( "NewAttributeTypeContentWizardPage" );
         setTitle( "Attribute Type Content" );
         setDescription( "Please enter the superior, usage, syntax and properties for the
attribute type." );
         setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
@@ -93,7 +93,7 @@
         usageComboViewer.setLabelProvider( new LabelProvider() );
         usageComboViewer.setContentProvider( new ArrayContentProvider() );
         usageComboViewer.setInput( new String[]
-            { "Directory Operation", "Distributed Operation", " DSA Operation", "User Applications"
} );
+            { "Directory Operation", "Distributed Operation", "DSA Operation", "User Applications"
} );
 
         // Syntax Group
         Group syntaxGroup = new Group( composite, SWT.NONE );

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java?view=diff&rev=550423&r1=550422&r2=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
Mon Jun 25 02:09:13 2007
@@ -54,7 +54,7 @@
      */
     protected NewAttributeTypeGeneralWizardPage()
     {
-        super( "General" );
+        super( "NewAttributeTypeGeneralWizardPage" );
         setTitle( "Attribute Type" );
         setDescription( "Create a new attribute type." );
         setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java?view=diff&rev=550423&r1=550422&r2=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java
Mon Jun 25 02:09:13 2007
@@ -49,7 +49,7 @@
      */
     public NewAttributeTypeMatchingRulesWizardPage()
     {
-        super( "MatchingRules" );
+        super( "NewAttributeTypeMatchingRulesWizardPage" );
         setTitle( "Matching Rules" );
         setDescription( "Please specify the matching rules (equality, ordering and substring)
to use for the attribute type." );
         setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java?view=auto&rev=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
Mon Jun 25 02:09:13 2007
@@ -0,0 +1,130 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.view.wizards;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.Activator;
+import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class represents the Content WizardPage of the ObjectClassWizard.
+ * <p>
+ * It is used to let the user enter content information about the
+ * attribute type he wants to create (superiors, class type, and properties).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewObjectClassContentWizardPage extends WizardPage
+{
+    /**
+     * Creates a new instance of NewAttributeTypeContentWizardPage.
+     */
+    protected NewObjectClassContentWizardPage()
+    {
+        super( "NewObjectClassContentWizardPage" );
+        setTitle( "Object Class Content" );
+        setDescription( "Please enter the superiors, class type  and properties for the object
class." );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            PluginConstants.IMG_OBJECT_CLASS_NEW_WIZARD ) );
+    }
+
+
+    public void createControl( Composite parent )
+    {
+        Composite composite = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        composite.setLayout( layout );
+
+        // Superiors
+        Group superiorsGroup = new Group( composite, SWT.NONE );
+        superiorsGroup.setText( "Superiors" );
+        superiorsGroup.setLayout( new GridLayout( 2, false ) );
+        superiorsGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Superiors
+        Table superiorsTable = new Table( superiorsGroup, SWT.BORDER );
+        GridData superiorsTableGridData = new GridData( SWT.FILL, SWT.FILL, true, true, 1,
2 );
+        superiorsTableGridData.heightHint = 100;
+        superiorsTable.setLayoutData( superiorsTableGridData );
+        TableViewer superiorsTableViewer = new TableViewer( superiorsTable );
+        superiorsTableViewer.setLabelProvider( new LabelProvider() );
+        superiorsTableViewer.setContentProvider( new ArrayContentProvider() );
+        Button superiorsAddButton = new Button( superiorsGroup, SWT.PUSH );
+        superiorsAddButton.setText( "Add..." );
+        superiorsAddButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE, false, false
) );
+        Button superiorsRemoveButton = new Button( superiorsGroup, SWT.PUSH );
+        superiorsRemoveButton.setText( "Remove" );
+        superiorsRemoveButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE, false, false
) );
+
+        // Class Type Group
+        Group classTypeGroup = new Group( composite, SWT.NONE );
+        classTypeGroup.setText( "Class Type" );
+        classTypeGroup.setLayout( new GridLayout( 5, false ) );
+        classTypeGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Class Type
+        Label classTypeLable = new Label( classTypeGroup, SWT.NONE );
+        classTypeLable.setText( "Class Type:" );
+        new Label( classTypeGroup, SWT.NONE ).setText( "          " );
+        Button structuralRadio = new Button( classTypeGroup, SWT.RADIO );
+        structuralRadio.setText( "Structural" );
+        GridData structuralRadioGridData = new GridData( SWT.LEFT, SWT.NONE, false, false
);
+        structuralRadioGridData.widthHint = 115;
+        structuralRadio.setLayoutData( structuralRadioGridData );
+        Button abstractRadio = new Button( classTypeGroup, SWT.RADIO );
+        abstractRadio.setText( "Abstract" );
+        GridData abstractRadioGridData = new GridData( SWT.LEFT, SWT.NONE, false, false );
+        abstractRadioGridData.widthHint = 115;
+        abstractRadio.setLayoutData( structuralRadioGridData );
+        Button auxiliaryRadio = new Button( classTypeGroup, SWT.RADIO );
+        auxiliaryRadio.setText( "Auxiliary" );
+        GridData auxiliaryRadioGridData = new GridData( SWT.LEFT, SWT.NONE, false, false
);
+        auxiliaryRadioGridData.widthHint = 115;
+        auxiliaryRadio.setLayoutData( structuralRadioGridData );
+
+        // Properties Group
+        Group propertiesGroup = new Group( composite, SWT.NONE );
+        propertiesGroup.setText( "Properties" );
+        propertiesGroup.setLayout( new GridLayout() );
+        propertiesGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Obsolete
+        new Label( composite, SWT.NONE );
+        Button obsoleteCheckbox = new Button( propertiesGroup, SWT.CHECK );
+        obsoleteCheckbox.setText( "Obsolete" );
+
+        setControl( composite );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java?view=auto&rev=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
Mon Jun 25 02:09:13 2007
@@ -0,0 +1,120 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.view.wizards;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.Activator;
+import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class represents the General WizardPage of the NewObjectClassWizard.
+ * <p>
+ * It is used to let the user enter general information about the
+ * attribute type he wants to create (schema, OID, aliases an description).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewObjectClassGeneralPageWizardPage extends WizardPage
+{
+    /**
+     * Creates a new instance of NewObjectClassGeneralPageWizardPage.
+     */
+    protected NewObjectClassGeneralPageWizardPage()
+    {
+        super( "NewObjectClassGeneralPageWizardPage" );
+        setTitle( "Object Class" );
+        setDescription( "Create a new object class." );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            PluginConstants.IMG_OBJECT_CLASS_NEW_WIZARD ) );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl( Composite parent )
+    {
+        Composite composite = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        composite.setLayout( layout );
+
+        // Schema Group
+        Group schemaGroup = new Group( composite, SWT.NONE );
+        schemaGroup.setText( "Schema" );
+        schemaGroup.setLayout( new GridLayout( 2, false ) );
+        schemaGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Schema
+        Label schemaLabel = new Label( schemaGroup, SWT.NONE );
+        schemaLabel.setText( "Schema:" );
+        Combo schemaCombo = new Combo( schemaGroup, SWT.READ_ONLY );
+        schemaCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+        ComboViewer schemaComboViewer = new ComboViewer( schemaCombo );
+        schemaComboViewer.setLabelProvider( new LabelProvider() );
+        schemaComboViewer.setContentProvider( new ArrayContentProvider() );
+
+        // Naming and Description Group
+        Group namingDescriptionGroup = new Group( composite, SWT.NONE );
+        namingDescriptionGroup.setText( "Naming and Description" );
+        namingDescriptionGroup.setLayout( new GridLayout( 3, false ) );
+        namingDescriptionGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false
) );
+
+        // OID
+        Label oidLabel = new Label( namingDescriptionGroup, SWT.NONE );
+        oidLabel.setText( "OID:" );
+        Text oidText = new Text( namingDescriptionGroup, SWT.BORDER );
+        oidText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+
+        // Aliases
+        Label aliasesLabel = new Label( namingDescriptionGroup, SWT.NONE );
+        aliasesLabel.setText( "Aliases:" );
+        Text aliasesText = new Text( namingDescriptionGroup, SWT.BORDER );
+        aliasesText.setEnabled( false );
+        aliasesText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+        Button aliasesButton = new Button( namingDescriptionGroup, SWT.PUSH );
+        aliasesButton.setText( "Edit" );
+
+        // Description
+        Label descriptionLabel = new Label( namingDescriptionGroup, SWT.NONE );
+        descriptionLabel.setText( "Description:" );
+        Text descriptionText = new Text( namingDescriptionGroup, SWT.MULTI | SWT.BORDER |
SWT.V_SCROLL );
+        GridData descriptionGridData = new GridData( SWT.FILL, SWT.NONE, true, false, 2,
1 );
+        descriptionGridData.heightHint = 67;
+        descriptionText.setLayoutData( descriptionGridData );
+
+        setControl( composite );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassMandatoryAttributesPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassMandatoryAttributesPage.java?view=auto&rev=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassMandatoryAttributesPage.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassMandatoryAttributesPage.java
Mon Jun 25 02:09:13 2007
@@ -0,0 +1,92 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.view.wizards;
+
+import org.apache.directory.studio.apacheds.schemaeditor.Activator;
+import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * This class represents the Mandatory Attribute Types WizardPage of the NewObjectClassWizard.
+ * <p>
+ * It is used to let the user specify the mandatory attribute types for the object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewObjectClassMandatoryAttributesPage extends WizardPage
+{
+    /**
+     * Creates a new instance of NewObjectClassMandatoryAttributesPage.
+     */
+    protected NewObjectClassMandatoryAttributesPage()
+    {
+        super( "NewObjectClassMandatoryAttributesPage" );
+        setTitle( "Mandatory Attribute Types" );
+        setDescription( "Please specify the mandatory attribute types for the object class."
);
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            PluginConstants.IMG_OBJECT_CLASS_NEW_WIZARD ) );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl( Composite parent )
+    {
+        Composite composite = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        composite.setLayout( layout );
+
+        // Mandatory Attribute Types Group
+        Group mandatoryAttributeTypesGroup = new Group( composite, SWT.NONE );
+        mandatoryAttributeTypesGroup.setText( "Mandatory Attribute Types" );
+        mandatoryAttributeTypesGroup.setLayout( new GridLayout( 2, false ) );
+        mandatoryAttributeTypesGroup.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true,
true ) );
+        
+        // Mandatory Attribute Types
+        Table mandatoryAttributeTypesTable = new Table( mandatoryAttributeTypesGroup, SWT.BORDER
);
+        GridData mandatoryAttributeTypesTableGridData = new GridData( SWT.FILL, SWT.FILL,
true, true, 1, 2 );
+        mandatoryAttributeTypesTableGridData.heightHint = 100;
+        mandatoryAttributeTypesTable.setLayoutData( mandatoryAttributeTypesTableGridData
);
+        TableViewer mandatoryAttributeTypesTableViewer = new TableViewer( mandatoryAttributeTypesTable
);
+        mandatoryAttributeTypesTableViewer.setLabelProvider( new LabelProvider() );
+        mandatoryAttributeTypesTableViewer.setContentProvider( new ArrayContentProvider()
);
+        Button mandatoryAttributeTypesAddButton = new Button( mandatoryAttributeTypesGroup,
SWT.PUSH );
+        mandatoryAttributeTypesAddButton.setText( "Add..." );
+        mandatoryAttributeTypesAddButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE,
false, false ) );
+        Button mandatoryAttributeTypesRemoveButton = new Button( mandatoryAttributeTypesGroup,
SWT.PUSH );
+        mandatoryAttributeTypesRemoveButton.setText( "Remove" );
+        mandatoryAttributeTypesRemoveButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE,
false, false ) );
+        
+        setControl( composite );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassOptionalAttributesPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassOptionalAttributesPage.java?view=auto&rev=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassOptionalAttributesPage.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassOptionalAttributesPage.java
Mon Jun 25 02:09:13 2007
@@ -0,0 +1,94 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.view.wizards;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.Activator;
+import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class represents the Optional Attribute Types WizardPage of the NewObjectClassWizard.
+ * <p>
+ * It is used to let the user specify the optional attribute types for the object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewObjectClassOptionalAttributesPage extends WizardPage
+{
+    /**
+     * Creates a new instance of NewObjectClassOptionalAttributesPage.
+     */
+    protected NewObjectClassOptionalAttributesPage()
+    {
+        super( "NewObjectClassOptionalAttributesPage" );
+        setTitle( "Optional Attribute Types" );
+        setDescription( "Please specify the optional attribute types for the object class."
);
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            PluginConstants.IMG_OBJECT_CLASS_NEW_WIZARD ) );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl( Composite parent )
+    {
+        Composite composite = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        composite.setLayout( layout );
+
+        // Optional Attribute Types Group
+        Group optionalAttributeTypesGroup = new Group( composite, SWT.NONE );
+        optionalAttributeTypesGroup.setText( "Optional Attribute Types" );
+        optionalAttributeTypesGroup.setLayout( new GridLayout( 2, false ) );
+        optionalAttributeTypesGroup.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true,
true ) );
+
+        // Optional Attribute Types
+        Table optionalAttributeTypesTable = new Table( optionalAttributeTypesGroup, SWT.BORDER
);
+        GridData optionalAttributeTypesTableGridData = new GridData( SWT.FILL, SWT.FILL,
true, true, 1, 2 );
+        optionalAttributeTypesTableGridData.heightHint = 100;
+        optionalAttributeTypesTable.setLayoutData( optionalAttributeTypesTableGridData );
+        TableViewer optionalAttributeTypesTableViewer = new TableViewer( optionalAttributeTypesTable
);
+        optionalAttributeTypesTableViewer.setLabelProvider( new LabelProvider() );
+        optionalAttributeTypesTableViewer.setContentProvider( new ArrayContentProvider()
);
+        Button optionalAttributeTypesAddButton = new Button( optionalAttributeTypesGroup,
SWT.PUSH );
+        optionalAttributeTypesAddButton.setText( "Add..." );
+        optionalAttributeTypesAddButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE,
false, false ) );
+        Button optionalAttributeTypesRemoveButton = new Button( optionalAttributeTypesGroup,
SWT.PUSH );
+        optionalAttributeTypesRemoveButton.setText( "Remove" );
+        optionalAttributeTypesRemoveButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE,
false, false ) );
+
+        setControl( composite );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassWizard.java?view=auto&rev=550423
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassWizard.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewObjectClassWizard.java
Mon Jun 25 02:09:13 2007
@@ -0,0 +1,81 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.view.wizards;
+
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * This class represents the wizard to create a new ObjectClass.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewObjectClassWizard extends Wizard implements INewWizard
+{
+    // The pages of the wizards
+    private WizardPage generalPage;
+    private WizardPage contentPage;
+    private WizardPage mandatoryAttributesPage;
+    private WizardPage optionalAttributesPage;
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    public void addPages()
+    {
+        // Creating pages
+        generalPage = new NewObjectClassGeneralPageWizardPage();
+        contentPage = new NewObjectClassContentWizardPage();
+        mandatoryAttributesPage = new NewObjectClassMandatoryAttributesPage();
+        optionalAttributesPage = new NewObjectClassOptionalAttributesPage();
+
+        // Adding pages
+        addPage( generalPage );
+        addPage( contentPage );
+        addPage( mandatoryAttributesPage );
+        addPage( optionalAttributesPage );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    public boolean performFinish()
+    {
+        // TODO Auto-generated method stub
+        return true;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+     */
+    public void init( IWorkbench workbench, IStructuredSelection selection )
+    {
+        // Nothing to do.
+    }
+}



Mime
View raw message