diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java')
-rwxr-xr-x | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java index 89ce8e033..618c247d3 100755 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java @@ -17,6 +17,7 @@ import org.eclipse.jface.layout.PixelConverter; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; +import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.custom.ViewForm; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Image; @@ -383,6 +384,28 @@ public class SWTFactory { } /** + * Creates a new styled text widget + * @param parent the parent composite to add this styled text widget to + * @param style the style bits for the styled text widget + * @param hspan the horizontal span to take up on the parent composite + * @param width the desired width of the styled text widget + * @param height the desired height of the styled text widget + * @param fill the fill style for the widget + * @return the new styled text widget + * @since 3.9 + */ + public static StyledText createStyledText(Composite parent, int style, int hspan, int width, int height, int fill) { + StyledText t = new StyledText(parent, style); + t.setFont(parent.getFont()); + GridData gd = new GridData(fill); + gd.horizontalSpan = hspan; + gd.widthHint = width; + gd.heightHint = height; + t.setLayoutData(gd); + return t; + } + + /** * Creates a new text widget * @param parent the parent composite to add this text widget to * @param style the style bits for the text widget |