Mercurial > projects > dwt-addons
changeset 69:07b9d96fd764
Make nested class CellEditor.LayoutData a top level class to omit compiler errors "forward reference"
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 19 May 2008 13:41:06 +0200 |
parents | 7943b8e4206d |
children | 46a6e0e6ccd4 |
files | dwtx/jface/viewers/CellEditor.d dwtx/jface/viewers/ColumnViewerEditor.d dwtx/jface/viewers/TableTreeViewer.d dwtx/jface/viewers/TableViewerEditor.d dwtx/jface/viewers/TreeViewerEditor.d |
diffstat | 5 files changed, 25 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtx/jface/viewers/CellEditor.d Fri May 16 23:44:34 2008 +0200 +++ b/dwtx/jface/viewers/CellEditor.d Mon May 19 13:41:06 2008 +0200 @@ -29,6 +29,26 @@ import dwt.dwthelper.utils; + /** + * Struct-like layout data for cell editors, with reasonable defaults + * for all fields. + */ + public static class LayoutData { + /** + * Horizontal alignment; <code>DWT.LEFT</code> by default. + */ + public int horizontalAlignment = DWT.LEFT; + + /** + * Indicates control grabs additional space; <code>true</code> by default. + */ + public bool grabHorizontal = true; + + /** + * Minimum width in pixels; <code>50</code> pixels by default. + */ + public int minimumWidth = 50; + } /** * Abstract base class for cell editors. Implements property change listener handling, * and DWT window management. @@ -94,27 +114,7 @@ */ private int style = defaultStyle; - /** - * Struct-like layout data for cell editors, with reasonable defaults - * for all fields. - */ - public static class LayoutData { - /** - * Horizontal alignment; <code>DWT.LEFT</code> by default. - */ - public int horizontalAlignment = DWT.LEFT; - - /** - * Indicates control grabs additional space; <code>true</code> by default. - */ - public bool grabHorizontal = true; - - /** - * Minimum width in pixels; <code>50</code> pixels by default. - */ - public int minimumWidth = 50; - } - + //public alias dwtx.jface.viewers.CellEditor.LayoutData LayoutData; /** * Property name for the copy action */
--- a/dwtx/jface/viewers/ColumnViewerEditor.d Fri May 16 23:44:34 2008 +0200 +++ b/dwtx/jface/viewers/ColumnViewerEditor.d Mon May 19 13:41:06 2008 +0200 @@ -628,7 +628,7 @@ * @param layoutData * the layout data used when editor is displayed */ - protected abstract void setLayoutData(CellEditor.LayoutData layoutData); + protected abstract void setLayoutData(LayoutData layoutData); /** * @param focusCell
--- a/dwtx/jface/viewers/TableTreeViewer.d Fri May 16 23:44:34 2008 +0200 +++ b/dwtx/jface/viewers/TableTreeViewer.d Mon May 19 13:41:06 2008 +0200 @@ -460,7 +460,7 @@ getTableTree().showSelection(); } - void setLayoutData(CellEditor.LayoutData layoutData) { + void setLayoutData(LayoutData layoutData) { tableTreeEditor.horizontalAlignment = layoutData.horizontalAlignment; tableTreeEditor.grabHorizontal = layoutData.grabHorizontal; tableTreeEditor.minimumWidth = layoutData.minimumWidth;
--- a/dwtx/jface/viewers/TableViewerEditor.d Fri May 16 23:44:34 2008 +0200 +++ b/dwtx/jface/viewers/TableViewerEditor.d Mon May 19 13:41:06 2008 +0200 @@ -125,7 +125,7 @@ tableEditor.setEditor(w, cast(TableItem) item, columnNumber); } - protected override void setLayoutData(CellEditor.LayoutData layoutData) { + protected override void setLayoutData(LayoutData layoutData) { tableEditor.grabHorizontal = layoutData.grabHorizontal; tableEditor.horizontalAlignment = layoutData.horizontalAlignment; tableEditor.minimumWidth = layoutData.minimumWidth;
--- a/dwtx/jface/viewers/TreeViewerEditor.d Fri May 16 23:44:34 2008 +0200 +++ b/dwtx/jface/viewers/TreeViewerEditor.d Mon May 19 13:41:06 2008 +0200 @@ -122,7 +122,7 @@ treeEditor.setEditor(w, cast(TreeItem) item, fColumnNumber); } - protected override void setLayoutData(CellEditor.LayoutData layoutData) { + protected override void setLayoutData(LayoutData layoutData) { treeEditor.grabHorizontal = layoutData.grabHorizontal; treeEditor.horizontalAlignment = layoutData.horizontalAlignment; treeEditor.minimumWidth = layoutData.minimumWidth;