directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r910189 - /directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/widgets/LdifEditorWidget.java
Date Mon, 15 Feb 2010 09:47:49 GMT
Author: pamarcelot
Date: Mon Feb 15 09:47:49 2010
New Revision: 910189

URL: http://svn.apache.org/viewvc?rev=910189&view=rev
Log:
Stored the main composite in a special field.
Added a method to get the control associated with the widget.

Modified:
    directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/widgets/LdifEditorWidget.java

Modified: directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/widgets/LdifEditorWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/widgets/LdifEditorWidget.java?rev=910189&r1=910188&r2=910189&view=diff
==============================================================================
--- directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/widgets/LdifEditorWidget.java
(original)
+++ directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/widgets/LdifEditorWidget.java
Mon Feb 15 09:47:49 2010
@@ -39,6 +39,7 @@
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 
 
 /**
@@ -72,6 +73,9 @@
     /** The source viewer configuration. */
     private LdifSourceViewerConfiguration sourceViewerConfiguration;
 
+    /** The widget composite */
+    private Composite composite;
+
 
     /**
      * Creates a new instance of LdifEditorWidget.
@@ -110,7 +114,7 @@
      */
     public void createWidget( Composite parent )
     {
-        Composite composite = new Composite( parent, SWT.NONE );
+        composite = new Composite( parent, SWT.NONE );
         composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
         GridLayout layout = new GridLayout( 1, false );
         layout.marginWidth = 0;
@@ -212,4 +216,14 @@
         return sourceViewerConfiguration;
     }
 
+
+    /**
+     * Returns the primary control associated with this view form.
+     *
+     * @return the SWT control which displays this view form's content
+     */
+    public Control getControl()
+    {
+        return composite;
+    }
 }



Mime
View raw message