commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt SwtTagLibrary.java WidgetTag.java
Date Wed, 19 Feb 2003 07:24:41 GMT
jstrachan    2003/02/18 23:24:40

  Modified:    jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt
                        SwtTagLibrary.java WidgetTag.java
  Log:
  applying patch
  
  http://jira.werken.com/secure/ViewIssue.jspa?key=JELLY-31&page=history
  
  which was kindly submitted by Christiaan ten Klooster which adds support for ScrolledComposite
to wrap any Control in a scroll window
  
  Revision  Changes    Path
  1.7       +1 -0      jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/SwtTagLibrary.java
  
  Index: SwtTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/SwtTagLibrary.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SwtTagLibrary.java	11 Feb 2003 15:29:06 -0000	1.6
  +++ SwtTagLibrary.java	19 Feb 2003 07:24:40 -0000	1.7
  @@ -107,6 +107,7 @@
           registerWidgetTag( "caret", Caret.class );
           registerWidgetTag( "combo", Combo.class, SWT.DROP_DOWN );
           registerWidgetTag( "composite", Composite.class );
  +	 	registerWidgetTag( "scrolledComposite", ScrolledComposite.class, SWT.H_SCROLL | SWT.V_SCROLL);
           registerWidgetTag( "coolBar", CoolBar.class, SWT.VERTICAL );
           registerWidgetTag( "coolItem", CoolItem.class );
           registerWidgetTag( "decorations", Decorations.class );
  
  
  
  1.8       +7 -0      jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/WidgetTag.java
  
  Index: WidgetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/WidgetTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WidgetTag.java	11 Feb 2003 15:29:06 -0000	1.7
  +++ WidgetTag.java	19 Feb 2003 07:24:40 -0000	1.8
  @@ -72,6 +72,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.eclipse.swt.SWT;
  +import org.eclipse.swt.custom.ScrolledComposite;
   import org.eclipse.swt.graphics.Point;
   import org.eclipse.swt.widgets.Control;
   import org.eclipse.swt.widgets.Widget;
  @@ -208,6 +209,12 @@
        * @param widget is the new child widget to be attached to the parent
        */
       protected void attachWidgets(Widget parent, Widget widget) {
  +        // set the content that will be scrolled if the parent is a ScrolledComposite
  +	   if (parent instanceof ScrolledComposite
  +	       && widget instanceof Control) {
  +	       ScrolledComposite scrolledComposite = (ScrolledComposite) parent;
  +	       scrolledComposite.setContent((Control) widget);
  +	   }
       }
       
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message