directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r549500 - 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 Thu, 21 Jun 2007 14:49:51 GMT
Author: pamarcelot
Date: Thu Jun 21 07:49:50 2007
New Revision: 549500

URL: http://svn.apache.org/viewvc?view=rev&rev=549500
Log:
Added the New Attribute Type Wizard.

Added:
    directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/attribute_type_new.gif
  (with props)
    directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/attribute_type_new_wizard.png
  (with props)
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralPageWizardPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeWizard.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

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=549500&r1=549499&r2=549500
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml Thu Jun 21 07:49:50 2007
@@ -36,4 +36,18 @@
        point="org.eclipse.core.runtime.preferences">
     <initializer class="org.apache.directory.studio.apacheds.schemaeditor.PreferenceInitializer"/>
  </extension>
+ <extension
+       point="org.eclipse.ui.newWizards">
+    <category
+          id="org.apache.directory.studio.apacheds.schemaeditor.newWizardCategory"
+          name="Apache DS Schema Editor"/>
+    <wizard
+          category="org.apache.directory.studio.apacheds.schemaeditor.newWizardCategory"
+          class="org.apache.directory.studio.apacheds.schemaeditor.view.wizards.NewAttributeTypeWizard"
+          hasPages="true"
+          icon="resources/icons/attribute_type_new.gif"
+          id="org.apache.directory.studio.apacheds.schemaeditor.wizards.NewAttributeTypeWizard"
+          name="New Attribute Type"
+          project="false"/>
+ </extension>
 </plugin>

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

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

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

Propchange: directory/studio/trunk/studio-apacheds-schemaeditor/resources/icons/attribute_type_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=549500&r1=549499&r2=549500
==============================================================================
--- 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
Thu Jun 21 07:49:50 2007
@@ -30,6 +30,8 @@
 {
     // Images
     public static final String IMG_ATTRIBUTE_TYPE = "resources/icons/attribute_type.gif";
+    public static final String IMG_ATTRIBUTE_TYPE_NEW = "resources/icons/attribute_type_new.gif";
+    public static final String IMG_ATTRIBUTE_TYPE_NEW_WIZARD = "resources/icons/attribute_type_new_wizard.png";
     public static final String IMG_CONNECT = "resources/icons/connect.gif";
     public static final String IMG_DISCONNECT = "resources/icons/disconnect.gif";
     public static final String IMG_DIFFERENCE_ADD = "resources/icons/difference_add.png";

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentPage.java?view=auto&rev=549500
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentPage.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeContentPage.java
Thu Jun 21 07:49:50 2007
@@ -0,0 +1,149 @@
+/*
+ *  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.Spinner;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * 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).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewAttributeTypeContentPage extends WizardPage
+{
+    /**
+     * Creates a new instance of NewAttributeTypeContentPage.
+     */
+    protected NewAttributeTypeContentPage()
+    {
+        super( "Options" );
+        setTitle( "Attribute Type Content" );
+        setDescription( "Please enter the superior, usage, syntax and properties for the
attribute type." );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            PluginConstants.IMG_ATTRIBUTE_TYPE_NEW_WIZARD ) );
+    }
+
+
+    public void createControl( Composite parent )
+    {
+        Composite composite = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        composite.setLayout( layout );
+
+        // Superior and Usage Group
+        Group superiorUsageGroup = new Group( composite, SWT.NONE );
+        superiorUsageGroup.setText( "Superior and Usage" );
+        superiorUsageGroup.setLayout( new GridLayout( 3, false ) );
+        superiorUsageGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false)
);
+        
+        // Superior
+        Label superiorLabel = new Label( superiorUsageGroup, SWT.NONE );
+        superiorLabel.setText( "Superior:" );
+        Text superiorText = new Text( superiorUsageGroup, SWT.BORDER );
+        superiorText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+        Button superiorButton = new Button( superiorUsageGroup, SWT.PUSH );
+        superiorButton.setText( "Choose" );
+        superiorButton.setLayoutData( new GridData( SWT.NONE, SWT.NONE, false, false) );
+
+        // Usage
+        Label usageLabel = new Label( superiorUsageGroup, SWT.NONE );
+        usageLabel.setText( "Usage:" );
+        Combo usageCombo = new Combo( superiorUsageGroup, SWT.READ_ONLY );
+        usageCombo.setLayoutData( new GridData( SWT.NONE, SWT.NONE, false, false, 2, 1 )
);
+        ComboViewer usageComboViewer = new ComboViewer( usageCombo );
+        usageComboViewer.setLabelProvider( new LabelProvider() );
+        usageComboViewer.setContentProvider( new ArrayContentProvider() );
+        usageComboViewer.setInput( new String[]
+            { "Directory Operation", "Distributed Operation", " DSA Operation", "User Applications"
} );
+
+        // Syntax Group
+        Group syntaxGroup = new Group( composite, SWT.NONE );
+        syntaxGroup.setText( "Syntax" );
+        syntaxGroup.setLayout( new GridLayout( 2, false ) );
+        syntaxGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false) );
+        
+        // Syntax
+        Label syntaxLabel = new Label( syntaxGroup, SWT.NONE );
+        syntaxLabel.setText( "Syntax:" );
+        Combo syntaxCombo = new Combo( syntaxGroup, SWT.BORDER );
+        syntaxCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Syntax Length
+        Label lengthLabel = new Label( syntaxGroup, SWT.NONE );
+        lengthLabel.setText( "Length:" );
+        Spinner lengthSpinner = new Spinner( syntaxGroup, SWT.BORDER );
+        lengthSpinner.setIncrement( 1 );
+        lengthSpinner.setMinimum( 0 );
+        lengthSpinner.setMaximum( Integer.MAX_VALUE );
+        GridData lengthSpinnerGridData = new GridData( SWT.NONE, SWT.NONE, false, false );
+        lengthSpinnerGridData.widthHint = 42;
+        lengthSpinner.setLayoutData( lengthSpinnerGridData );
+
+        // 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" );
+
+        // Single value
+        new Label( composite, SWT.NONE );
+        Button singleValueCheckbox = new Button( propertiesGroup, SWT.CHECK );
+        singleValueCheckbox.setText( "Single Value" );
+
+        // Collective
+        new Label( composite, SWT.NONE );
+        Button collectiveCheckbox = new Button( propertiesGroup, SWT.CHECK );
+        collectiveCheckbox.setText( "Collective" );
+
+        // No User Modification
+        new Label( composite, SWT.NONE );
+        Button noUserModificationCheckbox = new Button( propertiesGroup, SWT.CHECK );
+        noUserModificationCheckbox.setText( "No User Modification" );
+
+        setControl( composite );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralPageWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralPageWizardPage.java?view=auto&rev=549500
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralPageWizardPage.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeGeneralPageWizardPage.java
Thu Jun 21 07:49:50 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 NewAttributeTypeWizard.
+ * <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 NewAttributeTypeGeneralPageWizardPage extends WizardPage
+{
+    /**
+     * Creates a new instance of NewAttributeTypeGeneralPageWizardPage.
+     */
+    protected NewAttributeTypeGeneralPageWizardPage()
+    {
+        super( "General" );
+        setTitle( "Attribute Type" );
+        setDescription( "Create a new attribute type." );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            PluginConstants.IMG_ATTRIBUTE_TYPE_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/NewAttributeTypeMatchingRulesPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesPage.java?view=auto&rev=549500
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesPage.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesPage.java
Thu Jun 21 07:49:50 2007
@@ -0,0 +1,95 @@
+/*
+ *  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.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+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.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class represents the Matching Rules WizardPage of the NewAttributeTypeWizard.
+ * <p>
+ * It is used to let the user enter matching rules information about the
+ * attribute type he wants to create (equality, ordering, substring).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewAttributeTypeMatchingRulesPage extends WizardPage
+{
+    /**
+     * Creates a new instance of NewAttributeTypeMatchingRulesPage.
+     */
+    public NewAttributeTypeMatchingRulesPage()
+    {
+        super( "MatchingRules" );
+        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,
+            PluginConstants.IMG_ATTRIBUTE_TYPE_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 );
+
+        // Matching Rules Group
+        Group matchingRulesGroup = new Group( composite, SWT.NONE );
+        matchingRulesGroup.setText( "Matching Rules" );
+        matchingRulesGroup.setLayout( new GridLayout( 2, false ) );
+        matchingRulesGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false,
3, 1 ) );
+
+        // Equality
+        Label equalityLabel = new Label( matchingRulesGroup, SWT.NONE );
+        equalityLabel.setText( "Equality" );
+        Combo equalityCombo = new Combo( matchingRulesGroup, SWT.NONE );
+        equalityCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Ordering
+        Label orderingLabel = new Label( matchingRulesGroup, SWT.NONE );
+        orderingLabel.setText( "Ordering" );
+        Combo orderingCombo = new Combo( matchingRulesGroup, SWT.NONE );
+        orderingCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Substring
+        Label substringLabel = new Label( matchingRulesGroup, SWT.NONE );
+        substringLabel.setText( "Substring" );
+        Combo substringCombo = new Combo( matchingRulesGroup, SWT.NONE );
+        substringCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        setControl( composite );
+    }
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeWizard.java?view=auto&rev=549500
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeWizard.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/NewAttributeTypeWizard.java
Thu Jun 21 07:49:50 2007
@@ -0,0 +1,78 @@
+/*
+ *  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 AttributeType.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewAttributeTypeWizard extends Wizard implements INewWizard
+{
+    // The pages of the wizards
+    private WizardPage generalPage;
+    private WizardPage optionsPage;
+    private WizardPage matchingRulesPage;
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    public void addPages()
+    {
+        // Creating pages
+        generalPage = new NewAttributeTypeGeneralPageWizardPage();
+        optionsPage = new NewAttributeTypeContentPage();
+        matchingRulesPage = new NewAttributeTypeMatchingRulesPage();
+
+        // Adding pages
+        addPage( generalPage );
+        addPage( optionsPage );
+        addPage( matchingRulesPage );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    public boolean performFinish()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+
+    /* (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