You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/01/06 14:29:26 UTC
svn commit: r896438 - in
/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag:
ButtonRenderer.java TabGroupRenderer.java
Author: lofwyr
Date: Wed Jan 6 13:29:24 2010
New Revision: 896438
URL: http://svn.apache.org/viewvc?rev=896438&view=rev
Log:
TOBAGO-606: simplify
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=896438&r1=896437&r2=896438&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Wed Jan 6 13:29:24 2010
@@ -28,7 +28,6 @@
import org.apache.myfaces.tobago.component.UIButton;
import org.apache.myfaces.tobago.config.Configurable;
import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.layout.PixelMeasure;
import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
import org.apache.myfaces.tobago.renderkit.css.Style;
@@ -144,6 +143,6 @@
// left padding, right padding and when an image and an text then a middle padding.
width = width.add(padding.multiply(image && label.getText() != null ? 3 : 2));
- return new PixelMeasure(width);
+ return width;
}
}
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java?rev=896438&r1=896437&r2=896438&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java Wed Jan 6 13:29:24 2010
@@ -41,7 +41,6 @@
import org.apache.myfaces.tobago.event.TabChangeEvent;
import org.apache.myfaces.tobago.layout.Display;
import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.layout.PixelMeasure;
import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
import org.apache.myfaces.tobago.renderkit.css.Overflow;
@@ -288,7 +287,7 @@
writer.startElement(HtmlConstants.DIV, tabGroup);
Style map = new Style();
if (currentWidth.greaterThan(width)) {
- map.setWidth(new PixelMeasure(currentWidth));
+ map.setWidth(currentWidth);
map.setLeft(width.subtract(toolbarWidth).subtract(currentWidth));
} else {
map.setWidth(width.subtract(toolbarWidth));
@@ -537,7 +536,7 @@
AjaxUtils.checkParamValidity(context, tabGroup, UITabGroup.class);
TabList tabList = getTabList(context, tabGroup);
int index = ensureRenderedActiveIndex(context, tabGroup);
- Measure currentWidth = new PixelMeasure(getCurrentWidth(tabList, index));
+ Measure currentWidth = getCurrentWidth(tabList, index);
renderTabGroupView(context, HtmlRendererUtils.getTobagoResponseWriter(context),
tabGroup, index, SWITCH_TYPE_RELOAD_TAB,
ResourceManagerUtil.getImageWithPath(context, "image/1x1.gif"),