You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/09/09 14:20:26 UTC
cvs commit: jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt LayoutTagSupport.java LayoutTag.java SwtHelper.java ColorTag.java FontTag.java OnEventTag.java MenuTag.java GCTag.java LayoutDataTag.java
dion 2004/09/09 05:20:26
Modified: jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt
LayoutTagSupport.java LayoutTag.java SwtHelper.java
ColorTag.java FontTag.java OnEventTag.java
MenuTag.java GCTag.java LayoutDataTag.java
Log:
Fix license file whitespace
Revision Changes Path
1.7 +9 -9 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/LayoutTagSupport.java
Index: LayoutTagSupport.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/LayoutTagSupport.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- LayoutTagSupport.java 25 Feb 2004 01:31:55 -0000 1.6
+++ LayoutTagSupport.java 9 Sep 2004 12:20:26 -0000 1.7
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@
import org.apache.commons.logging.LogFactory;
import org.eclipse.swt.widgets.Widget;
-/**
+/**
* An abstract base class for Layout or LayoutData tags.
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
@@ -60,8 +60,8 @@
}
/**
- * Sets the name of the variable to use to expose the new Layout object.
- * If this attribute is not set then the parent widget tag will have its
+ * Sets the name of the variable to use to expose the new Layout object.
+ * If this attribute is not set then the parent widget tag will have its
* layout property set.
*/
public void setVar(String var) {
@@ -69,7 +69,7 @@
}
// Implementation methods
- //-------------------------------------------------------------------------
+ //-------------------------------------------------------------------------
/**
* Either defines a variable or adds the current component to the parent
*/
@@ -118,9 +118,9 @@
/**
* Provides a strategy method that allows values to be converted,
* particularly to support integer enumerations and String representations.
- *
+ *
* @param bean is the bean on which the property is to be set
- * @param name is the name of the property
+ * @param name is the name of the property
* @param value the value of the property
* @return the new value
*/
1.7 +5 -5 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/LayoutTag.java
Index: LayoutTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/LayoutTag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- LayoutTag.java 25 Feb 2004 01:31:55 -0000 1.6
+++ LayoutTag.java 9 Sep 2004 12:20:26 -0000 1.7
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,7 +24,7 @@
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Widget;
-/**
+/**
* Creates a new Layout implementations and adds it to the parent Widget.
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
@@ -54,7 +54,7 @@
}
// Implementation methods
- //-------------------------------------------------------------------------
+ //-------------------------------------------------------------------------
/**
* Either defines a variable or adds the current component to the parent
1.7 +7 -7 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/SwtHelper.java
Index: SwtHelper.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/SwtHelper.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SwtHelper.java 7 Sep 2004 02:07:40 -0000 1.6
+++ SwtHelper.java 9 Sep 2004 12:20:26 -0000 1.7
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,7 +23,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-/**
+/**
* A helper class for working with SWT.
* </p>
*
@@ -34,7 +34,7 @@
/** The Log to which logging calls will be made. */
private static final Log log = LogFactory.getLog(SwtHelper.class);
-
+
/**
* Parses the comma delimited String of style codes which are or'd
@@ -56,7 +56,7 @@
* @param text is a comma delimited text value such as "border, resize"
* @param toUpperCase is whether the text should be converted to upper case
* before its compared against the reflection fields
- *
+ *
* @return the int code
*/
public static int parseStyle(Class constantClass, String text, boolean toUpperCase) throws JellyTagException{
@@ -73,7 +73,7 @@
}
return answer;
}
-
+
/**
* @return the code for the given word or zero if the word doesn't match a
* valid style
1.2 +7 -7 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/ColorTag.java
Index: ColorTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/ColorTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ColorTag.java 5 Sep 2004 15:25:02 -0000 1.1
+++ ColorTag.java 9 Sep 2004 12:20:26 -0000 1.2
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -112,12 +112,12 @@
throw new JellyTagException("This tag requires a context variable name");
}
- final Color color =
+ final Color color =
new Color(
- parent.getDisplay(),
+ parent.getDisplay(),
ColorConverter.getInstance().parse(getRgb())
);
-
+
// store the Color in the context
context.setVariable(var, color);
}
1.2 +8 -8 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/FontTag.java
Index: FontTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/FontTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FontTag.java 5 Sep 2004 15:25:02 -0000 1.1
+++ FontTag.java 9 Sep 2004 12:20:26 -0000 1.2
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -137,7 +137,7 @@
/**
* Creates a {@link Font} instance as defined by the type, size and style
- * attributes, and stores this {@link Font} instance in the Context so that
+ * attributes, and stores this {@link Font} instance in the Context so that
* it can be referenced in the Jelly script.
*
* @param output {@link XMLOutput} reference
@@ -174,14 +174,14 @@
}
}
- final Font font =
+ final Font font =
new Font(
- parent.getDisplay(),
+ parent.getDisplay(),
type,
size,
style == null ? SWT.NORMAL : SwtHelper.parseStyle(SWT.class, style)
);
-
+
// store the Color in the context
context.setVariable(var, font);
}
1.5 +14 -14 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/OnEventTag.java
Index: OnEventTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/OnEventTag.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- OnEventTag.java 25 Feb 2004 01:31:55 -0000 1.4
+++ OnEventTag.java 9 Sep 2004 12:20:26 -0000 1.5
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,7 +26,7 @@
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Widget;
-/**
+/**
* A tag which implements a Listener to allow events to be processed by
* Jelly scripts
*
@@ -39,7 +39,7 @@
private static final Log log = LogFactory.getLog(OnEventTag.class);
private String var = "event";
- private String type;
+ private String type;
private XMLOutput output;
public OnEventTag() {
@@ -47,7 +47,7 @@
// Tag interface
//-------------------------------------------------------------------------
-
+
/**
* @see org.apache.commons.jelly.Tag#doTag(org.apache.commons.jelly.XMLOutput)
*/
@@ -58,22 +58,22 @@
if (type == null) {
throw new MissingAttributeException("type");
}
-
+
Widget widget = getParentWidget();
if (widget == null) {
throw new JellyTagException("This tag must be nested within a widget tag");
}
-
+
int eventType = getEventType(type);
if (eventType == 0) {
throw new JellyTagException("No event type specified, could not understand: " + type);
}
-
+
this.output = output;
widget.addListener(eventType, this);
}
-
+
// Listener interface
//-------------------------------------------------------------------------
/**
@@ -88,7 +88,7 @@
log.error("Caught exception: " + e + " while processing event: " + event, e);
}
}
-
+
// Properties
//-------------------------------------------------------------------------
@@ -110,7 +110,7 @@
public void setVar(String var) {
this.var = var;
}
-
+
/**
* Returns the type.
* @return String
@@ -121,7 +121,7 @@
/**
* Sets the type of the event listener to listen for.
- *
+ *
* @param type The type of the event to listen for
*/
public void setType(String type) {
@@ -140,5 +140,5 @@
protected int getEventType(String type) throws JellyTagException {
return SwtHelper.parseStyle(SWT.class, type, false);
}
-
+
}
1.8 +10 -10 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/MenuTag.java
Index: MenuTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/MenuTag.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MenuTag.java 25 Feb 2004 01:31:55 -0000 1.7
+++ MenuTag.java 9 Sep 2004 12:20:26 -0000 1.8
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,7 +24,7 @@
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Widget;
-/**
+/**
* This tag creates an SWT Menu
* </p>
*
@@ -35,7 +35,7 @@
/** The Log to which logging calls will be made. */
private static final Log log = LogFactory.getLog(MenuTag.class);
-
+
public MenuTag() {
super(Menu.class);
}
@@ -45,12 +45,12 @@
}
// Implementation methods
- //-------------------------------------------------------------------------
-
+ //-------------------------------------------------------------------------
+
/**
* Provides a strategy method to allow a new child widget to be attached to
* its parent
- *
+ *
* @param parent is the parent widget which is never null
* @param widget is the new child widget to be attached to the parent
*/
@@ -69,14 +69,14 @@
menuItem.setMenu(menu);
}
}
-
+
/**
* @see org.apache.commons.jelly.tags.swt.WidgetTag#createWidget(java.lang.Class, org.eclipse.swt.widgets.Widget, int)
*/
protected Object createWidget(Class theClass, Widget parent, int style)
throws JellyTagException {
- if (parent instanceof Decorations) {
+ if (parent instanceof Decorations) {
return super.createWidget(theClass, parent, style);
}
else {
1.2 +5 -5 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/GCTag.java
Index: GCTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/GCTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GCTag.java 5 Sep 2004 15:32:54 -0000 1.1
+++ GCTag.java 9 Sep 2004 12:20:26 -0000 1.2
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -99,7 +99,7 @@
if (var == null) {
throw new JellyTagException("This tag requires a context variable name");
}
-
+
// store the GC in the context
context.setVariable(var, new GC(drawable));
}
1.8 +5 -5 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/LayoutDataTag.java
Index: LayoutDataTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/LayoutDataTag.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- LayoutDataTag.java 25 Feb 2004 01:31:55 -0000 1.7
+++ LayoutDataTag.java 9 Sep 2004 12:20:26 -0000 1.8
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Widget;
-/**
+/**
* Creates a LayoutData object and sets it on the parent Widget.
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
@@ -43,7 +43,7 @@
}
// Implementation methods
- //-------------------------------------------------------------------------
+ //-------------------------------------------------------------------------
/**
* Either defines a variable or adds the current component to the parent
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org