diff options
author | Kevin Barnes <krbarnes> | 2007-06-20 20:02:38 +0000 |
---|---|---|
committer | Kevin Barnes <krbarnes> | 2007-06-20 20:02:38 +0000 |
commit | fd3f46d9d355f967992f89f018bf0137f41a5609 (patch) | |
tree | 7c017ac48f01bf3045fe0395f85895bd684a1970 | |
parent | acef77af78be86949f7fcd443acab7ba7924332a (diff) | |
download | eclipse.platform.swt-fd3f46d9d355f967992f89f018bf0137f41a5609.tar.gz eclipse.platform.swt-fd3f46d9d355f967992f89f018bf0137f41a5609.tar.xz eclipse.platform.swt-fd3f46d9d355f967992f89f018bf0137f41a5609.zip |
fixed missing text in tree items with columns
9 files changed, 44 insertions, 19 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.wpf.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.wpf.OS.properties index 9588770c8e..90f2aa5778 100644 --- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.wpf.OS.properties +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.wpf.OS.properties @@ -3226,6 +3226,8 @@ OS_UIElement_ClipToBounds=flags=setter OS_UIElement_ClipToBounds_0=cast=UIElement^,flags=gcobject OS_UIElement_ClipToBounds_1= +OS_UIElement_ClipToBoundsProperty=accessor=UIElement::ClipToBoundsProperty,flags=const gcobject + OS_UIElement_DesiredSize=flags=struct gcobject getter OS_UIElement_DesiredSize_0=cast=UIElement^,flags=gcobject diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp index a70900184a..c6abe3610d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp @@ -11818,6 +11818,19 @@ JNIEXPORT void JNICALL OS_NATIVE(UIElement_1ClipToBounds) } #endif +#ifndef NO_UIElement_1ClipToBoundsProperty +extern "C" JNIEXPORT jint JNICALL OS_NATIVE(UIElement_1ClipToBoundsProperty)(JNIEnv *env, jclass that); +JNIEXPORT jint JNICALL OS_NATIVE(UIElement_1ClipToBoundsProperty) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + OS_NATIVE_ENTER(env, that, UIElement_1ClipToBoundsProperty_FUNC); + rc = (jint)TO_HANDLE(UIElement::ClipToBoundsProperty); + OS_NATIVE_EXIT(env, that, UIElement_1ClipToBoundsProperty_FUNC); + return rc; +} +#endif + #ifndef NO_UIElement_1DesiredSize extern "C" JNIEXPORT jint JNICALL OS_NATIVE(UIElement_1DesiredSize)(JNIEnv *env, jclass that, jint arg0); JNIEXPORT jint JNICALL OS_NATIVE(UIElement_1DesiredSize) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp index 68293d2cbe..8f7b648e5b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp @@ -14,8 +14,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 1275; -int OS_nativeFunctionCallCount[1275]; +int OS_nativeFunctionCount = 1276; +int OS_nativeFunctionCallCount[1276]; char * OS_nativeFunctionNames[] = { "AccessText_1AccessKey", "AccessText_1Text", @@ -987,6 +987,7 @@ char * OS_nativeFunctionNames[] = { "UIElement_1CaptureMouse", "UIElement_1Clip", "UIElement_1ClipToBounds", + "UIElement_1ClipToBoundsProperty", "UIElement_1DesiredSize", "UIElement_1DragEnter", "UIElement_1DragEnterEvent", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h index f38d5e1d24..41605bf4d5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h @@ -995,6 +995,7 @@ typedef enum { UIElement_1CaptureMouse_FUNC, UIElement_1Clip_FUNC, UIElement_1ClipToBounds_FUNC, + UIElement_1ClipToBoundsProperty_FUNC, UIElement_1DesiredSize_FUNC, UIElement_1DragEnter_FUNC, UIElement_1DragEnterEvent_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java index b5e915401d..a15d01af94 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java @@ -1389,6 +1389,7 @@ public static final native void UIElement_AllowDrop(int sender, boolean value); public static final native boolean UIElement_CaptureMouse(int sender); public static final native void UIElement_Clip(int sender, int geometry); public static final native void UIElement_ClipToBounds(int sender, boolean value); +public static final native int UIElement_ClipToBoundsProperty(); public static final native void UIElement_DragEnter(int sender, int handler); public static final native int UIElement_DragEnterEvent(); public static final native void UIElement_DragLeave(int sender, int handler); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java index c23591c350..55e9632e3f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java @@ -348,10 +348,13 @@ int createCellTemplate (int index) { OS.FrameworkElementFactory_SetValueInt (onRenderNode, jniRefProperty, jniRef); OS.GCHandle_Free (jniRefProperty); int stackPanelName = createDotNetString (STACKPANEL_PART_NAME, false); - int stackPanelType = OS.StackPanel_typeid (); - int cellContentNode = OS.gcnew_FrameworkElementFactory (stackPanelType, stackPanelName); - OS.GCHandle_Free (stackPanelType); + int dockPanelType = OS.DockPanel_typeid (); + int cellContentNode = OS.gcnew_FrameworkElementFactory (dockPanelType, stackPanelName); + OS.GCHandle_Free (dockPanelType); OS.GCHandle_Free (stackPanelName); + int clipProperty = OS.UIElement_ClipToBoundsProperty (); + OS.FrameworkElementFactory_SetValue (cellContentNode, clipProperty, true); + OS.GCHandle_Free (clipProperty); if (index == 0 && (style & SWT.CHECK) != 0) { int checkBoxType = OS.CheckBox_typeid (); int checkBoxName = createDotNetString (CHECKBOX_PART_NAME, false); @@ -387,9 +390,9 @@ int createCellTemplate (int index) { OS.FrameworkElementFactory_SetValue (imageNode, marginProperty, thickness); OS.GCHandle_Free (marginProperty); OS.GCHandle_Free (thickness); - int orientationProperty = OS.StackPanel_OrientationProperty (); - OS.FrameworkElementFactory_SetValueOrientation (cellContentNode, orientationProperty, OS.Orientation_Horizontal); - OS.GCHandle_Free (orientationProperty); + int stretchProperty = OS.Image_StretchProperty (); + OS.FrameworkElementFactory_SetValueStretch(imageNode, stretchProperty, OS.Stretch_None); + OS.GCHandle_Free(stretchProperty); OS.FrameworkElementFactory_AppendChild (cellContentNode, imageNode); OS.GCHandle_Free (imageNode); OS.FrameworkElementFactory_AppendChild (cellContentNode, textNode); @@ -858,10 +861,11 @@ public int getHeaderHeight () { */ public boolean getHeaderVisible () { checkWidget (); + if (columnCount == 0) return false; int columns = OS.GridView_Columns (gridViewHandle); int column = OS.GridViewColumnCollection_default (columns, 0); int header = OS.GridViewColumn_Header (column); - boolean visible = OS.UIElement_Visibility(header) == OS.Visibility_Visible; + boolean visible = OS.UIElement_Visibility (header) == OS.Visibility_Visible; OS.GCHandle_Free (header); OS.GCHandle_Free (column); OS.GCHandle_Free (columns); @@ -1434,7 +1438,7 @@ void OnRender (int source, int dc) { OS.GCHandle_Free (type); TableItem item = getItem (itemHandle, true); OS.GCHandle_Free (itemHandle); - if (item.cached && item.rowHandle != 0) return; + if ((item.cached || (style & SWT.VIRTUAL) == 0) && item.rowHandle != 0) return; checkData (item); if (item.rowHandle == 0) { int rowPresenterType = OS.GridViewRowPresenter_typeid (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java index 7297f3dd7a..cb636da67e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java @@ -1185,7 +1185,7 @@ void updateText (int index) { int textBlock = findPart (index, Table.TEXT_PART_NAME); if (textBlock != 0) { if (strings [index] != null) { - int strPtr = createDotNetString (strings[index], false); + int strPtr = createDotNetString (strings [index], false); int text = OS.TextBlock_Text (textBlock); OS.TextBlock_Text (textBlock, strPtr); OS.GCHandle_Free (text); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java index 589d9bc440..d222330321 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java @@ -355,10 +355,13 @@ int createCellTemplate (int index) { OS.FrameworkElementFactory_SetValueInt (onRenderNode, jniRefProperty, jniRef); OS.GCHandle_Free (jniRefProperty); int stackPanelName = createDotNetString (STACKPANEL_PART_NAME, false); - int stackPanelType = OS.StackPanel_typeid (); - int cellContentNode = OS.gcnew_FrameworkElementFactory (stackPanelType, stackPanelName); - OS.GCHandle_Free (stackPanelType); + int dockPanelType = OS.DockPanel_typeid (); + int cellContentNode = OS.gcnew_FrameworkElementFactory (dockPanelType, stackPanelName); + OS.GCHandle_Free (dockPanelType); OS.GCHandle_Free (stackPanelName); + int clipProperty = OS.UIElement_ClipToBoundsProperty (); + OS.FrameworkElementFactory_SetValue (cellContentNode, clipProperty, true); + OS.GCHandle_Free (clipProperty); if (index == 0 && (style & SWT.CHECK) != 0) { int checkBoxType = OS.CheckBox_typeid (); int checkBoxName = createDotNetString (CHECKBOX_PART_NAME, false); @@ -397,9 +400,9 @@ int createCellTemplate (int index) { OS.FrameworkElementFactory_SetValue (imageNode, marginProperty, thickness); OS.GCHandle_Free (marginProperty); OS.GCHandle_Free (thickness); - int orientationProperty = OS.StackPanel_OrientationProperty (); - OS.FrameworkElementFactory_SetValueOrientation (cellContentNode, orientationProperty, OS.Orientation_Horizontal); - OS.GCHandle_Free (orientationProperty); + int stretchProperty = OS.Image_StretchProperty (); + OS.FrameworkElementFactory_SetValueStretch(imageNode, stretchProperty, OS.Stretch_None); + OS.GCHandle_Free(stretchProperty); OS.FrameworkElementFactory_AppendChild (cellContentNode, imageNode); OS.GCHandle_Free (imageNode); OS.FrameworkElementFactory_AppendChild (cellContentNode, textNode); @@ -1554,7 +1557,7 @@ void OnRender (int source, int dc) { OS.GCHandle_Free (type); TreeItem item = getItem (itemHandle, true); OS.GCHandle_Free (itemHandle); - if (item.cached && item.contentHandle != 0) return; + if ((item.cached || (style & SWT.VIRTUAL) == 0) && item.contentHandle != 0) return; checkData (item); if (item.contentHandle == 0) { item.contentHandle = item.findContentPresenter(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java index e907291327..2afb209158 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java @@ -1534,7 +1534,7 @@ void updateText (int index) { int textBlock = findPart (index, Tree.TEXT_PART_NAME); if (textBlock != 0) { if (strings [index] != null) { - int strPtr = createDotNetString (strings[index], false); + int strPtr = createDotNetString (strings [index], false); int text = OS.TextBlock_Text (textBlock); OS.TextBlock_Text (textBlock, strPtr); OS.GCHandle_Free (text); |