diff dwtx/jface/dialogs/InputDialog.d @ 70:46a6e0e6ccd4

Merge with d-fied sources of 3.4M7
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 01:36:46 +0200
parents ea8ff534f622
children
line wrap: on
line diff
--- a/dwtx/jface/dialogs/InputDialog.d	Mon May 19 13:41:06 2008 +0200
+++ b/dwtx/jface/dialogs/InputDialog.d	Thu May 22 01:36:46 2008 +0200
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -172,7 +172,7 @@
             label.setLayoutData(data);
             label.setFont(parent.getFont());
         }
-        text = new Text(composite, DWT.SINGLE | DWT.BORDER);
+        text = new Text(composite, getInputTextStyle());
         text.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
                 | GridData.HORIZONTAL_ALIGN_FILL));
         text.addModifyListener(new class ModifyListener {
@@ -286,4 +286,17 @@
             }
         }
     }
+    
+    /**
+     * Returns the style bits that should be used for the input text field.
+     * Defaults to a single line entry. Subclasses may override.
+     * 
+     * @return the integer style bits that should be used when creating the
+     *         input text
+     * 
+     * @since 3.4
+     */
+    protected int getInputTextStyle() {
+        return DWT.SINGLE | DWT.BORDER;
+    }
 }