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 2015/09/11 17:22:11 UTC
svn commit: r1702499 - in /myfaces/tobago/branches/tobago-3.0.x:
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/
tobago-core/src/main/java/org/apache/myfaces/t...
Author: lofwyr
Date: Fri Sep 11 15:22:10 2015
New Revision: 1702499
URL: http://svn.apache.org/r1702499
Log:
TOBAGO-1489: Optimize enums used for attributes in taglib.
* Orientation
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISegmentLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Orientation.java
myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISplitLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SplitLayoutTagDeclaration.java
myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java
myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java Fri Sep 11 15:22:10 2015
@@ -30,26 +30,4 @@ public abstract class AbstractUIFlexLayo
extends AbstractUILayoutBase implements LayoutManager, SupportsMarkup {
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.FlexLayout";
-
-/*
- public void init() {
- for (final LayoutComponent component : getLayoutContainer().getComponents()) {
- if (component instanceof LayoutContainer && component.isRendered()) {
- ((LayoutContainer) component).getLayoutManager().init();
- }
- }
- }
-
- public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
- }
-
- public void preProcessing(final Orientation orientation) {
- }
-
- public void mainProcessing(final Orientation orientation) {
- }
-
- public void postProcessing(final Orientation orientation) {
- }
-*/
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java Fri Sep 11 15:22:10 2015
@@ -25,27 +25,4 @@ import org.apache.myfaces.tobago.layout.
public abstract class AbstractUIFlowLayout extends AbstractUILayoutBase implements LayoutManager, SupportsMarkup {
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.FlowLayout";
-
-/*
- public void init() {
- for (final LayoutComponent component : getLayoutContainer().getComponents()) {
- if (component instanceof LayoutContainer && component.isRendered()) {
- ((LayoutContainer) component).getLayoutManager().init();
- }
- }
- }
-
- public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
- }
-
- public void preProcessing(final Orientation orientation) {
- }
-
- public void mainProcessing(final Orientation orientation) {
-
- }
-
- public void postProcessing(final Orientation orientation) {
- }
-*/
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISegmentLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISegmentLayout.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISegmentLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISegmentLayout.java Fri Sep 11 15:22:10 2015
@@ -31,28 +31,6 @@ public abstract class AbstractUISegmentL
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.SegmentLayout";
-/*
- public void init() {
- for (final LayoutComponent component : getLayoutContainer().getComponents()) {
- if (component instanceof LayoutContainer && component.isRendered()) {
- ((LayoutContainer) component).getLayoutManager().init();
- }
- }
- }
-
- public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
- }
-
- public void preProcessing(final Orientation orientation) {
- }
-
- public void mainProcessing(final Orientation orientation) {
- }
-
- public void postProcessing(final Orientation orientation) {
- }
-*/
-
@Override
public String toString() {
StringBuilder builder =new StringBuilder(getClass().getSimpleName());
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/Grid.java Fri Sep 11 15:22:10 2015
@@ -20,7 +20,6 @@
package org.apache.myfaces.tobago.internal.layout;
import org.apache.myfaces.tobago.layout.LayoutTokens;
-import org.apache.myfaces.tobago.layout.Orientation;
import org.apache.myfaces.tobago.layout.RelativeLayoutToken;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -111,10 +110,6 @@ public class Grid {
findNextFreeCell();
}
- public Cell getCell(final int i, final int j, final Orientation orientation) {
- return orientation == Orientation.HORIZONTAL ? getCell(i, j) : getCell(j, i);
- }
-
public Cell getCell(final int column, final int row) {
assert column >= 0 && column < columnCount : "column=" + column + " columnCount=" + columnCount;
assert row >= 0 : "row=" + row;
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutUtils.java Fri Sep 11 15:22:10 2015
@@ -21,14 +21,8 @@ package org.apache.myfaces.tobago.intern
import org.apache.myfaces.tobago.internal.component.AbstractUIFlexLayout;
import org.apache.myfaces.tobago.internal.component.AbstractUIFlowLayout;
-import org.apache.myfaces.tobago.layout.LayoutBase;
-import org.apache.myfaces.tobago.layout.LayoutBox;
import org.apache.myfaces.tobago.layout.LayoutComponent;
import org.apache.myfaces.tobago.layout.LayoutContainer;
-import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.layout.Orientation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import javax.faces.component.UIComponent;
import java.util.ArrayList;
@@ -38,8 +32,6 @@ import java.util.regex.Pattern;
public final class LayoutUtils {
- private static final Logger LOG = LoggerFactory.getLogger(LayoutUtils.class);
-
private static final Pattern TOKEN_PATTERN = Pattern.compile("^(\\d*px|\\d*\\*|\\d*%|auto|fixed)$");
private LayoutUtils() {
@@ -85,58 +77,4 @@ public final class LayoutUtils {
addLayoutChildren(child, result);
}
}
-
- public static Measure getBorderEnd(final Orientation orientation, final LayoutBox container) {
- return orientation == Orientation.HORIZONTAL ? container.getBorderRight() : container.getBorderBottom();
- }
-
- public static Measure getBorderBegin(final Orientation orientation, final LayoutBox container) {
- return orientation == Orientation.HORIZONTAL ? container.getBorderLeft() : container.getBorderTop();
- }
-
- public static Measure getPaddingEnd(final Orientation orientation, final LayoutBox container) {
- return orientation == Orientation.HORIZONTAL ? container.getPaddingRight() : container.getPaddingBottom();
- }
-
- public static Measure getPaddingBegin(final Orientation orientation, final LayoutBox container) {
- return orientation == Orientation.HORIZONTAL ? container.getPaddingLeft() : container.getPaddingTop();
- }
-
- public static Measure getCurrentSize(final Orientation orientation, final LayoutBase component) {
- return orientation == Orientation.HORIZONTAL ? component.getCurrentWidth() : component.getCurrentHeight();
- }
-
- public static void setCurrentSize(final Orientation orientation, final LayoutBase component, Measure size) {
- if (orientation == Orientation.HORIZONTAL) {
- final Measure width = component.getWidth();
- if (width != null) { // to not override set sizes
- size = width;
- } else {
- final Measure maximumWidth = component.getMaximumWidth();
- if (size.greaterThan(maximumWidth)) {
- size = maximumWidth;
- }
- final Measure minimumWidth = component.getMinimumWidth();
- if (size.lessThan(minimumWidth)) {
- size = minimumWidth;
- }
- }
- component.setCurrentWidth(size);
- } else {
- final Measure height = component.getHeight();
- if (height != null) { // to not override set sizes
- size = height;
- } else {
- final Measure maximumHeight = component.getMaximumHeight();
- if (size.greaterThan(maximumHeight)) {
- size = maximumHeight;
- }
- final Measure minimumHeight = component.getMinimumHeight();
- if (size.lessThan(minimumHeight)) {
- size = minimumHeight;
- }
- }
- component.setCurrentHeight(size);
- }
- }
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/OriginCell.java Fri Sep 11 15:22:10 2015
@@ -19,8 +19,6 @@
package org.apache.myfaces.tobago.internal.layout;
-import org.apache.myfaces.tobago.layout.Orientation;
-
import javax.faces.component.UIComponent;
public class OriginCell implements Cell {
@@ -49,10 +47,6 @@ public class OriginCell implements Cell
return true;
}
- public int getSpan(final Orientation orientation) {
- return orientation == Orientation.HORIZONTAL ? getColumnSpan() : getRowSpan();
- }
-
public int getColumnSpan() {
return columnSpan;
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java Fri Sep 11 15:22:10 2015
@@ -23,15 +23,4 @@ import org.apache.myfaces.tobago.config.
public interface LayoutManager extends Configurable {
-/*
- void init();
-
- void fixRelativeInsideAuto(Orientation orientation, boolean auto);
-
- void preProcessing(Orientation orientation);
-
- void mainProcessing(Orientation orientation);
-
- void postProcessing(Orientation orientation);
-*/
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Orientation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Orientation.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Orientation.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Orientation.java Fri Sep 11 15:22:10 2015
@@ -19,16 +19,22 @@
package org.apache.myfaces.tobago.layout;
+/**
+ * Layout relevant values for the orientation.
+ */
public enum Orientation {
- HORIZONTAL,
- VERTICAL;
-
- public Orientation other() {
- if (this == HORIZONTAL) {
- return VERTICAL;
- } else {
- return HORIZONTAL;
- }
- }
+ horizontal,
+ vertical;
+
+ /**
+ * Internal constant to use in annotations. Please use {@link Orientation#horizontal}
+ */
+ public static final String STRING_HORIZONTAL = "horizontal";
+
+ /**
+ * Internal constant to use in annotations. Please use {@link Orientation#horizontal}
+ */
+ public static final String STRING_VERTICAL = "vertical";
+
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISplitLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISplitLayout.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISplitLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISplitLayout.java Fri Sep 11 15:22:10 2015
@@ -33,9 +33,6 @@ import java.util.List;
public abstract class AbstractUISplitLayout extends AbstractUIGridLayout {
- public static final String VERTICAL = Orientation.VERTICAL.name();
- public static final String HORIZONTAL = Orientation.HORIZONTAL.name();
-
private String submittedLayout;
public void updateLayout(final int position) {
@@ -47,7 +44,7 @@ public abstract class AbstractUISplitLay
final int currentSize1;
final int currentSize2;
- if (HORIZONTAL.equals(getOrientation())) {
+ if (getOrientation() == Orientation.horizontal) {
oldPosition = secondComponent.getLeft().getPixel() - 5;
currentSize1 = firstComponent.getCurrentWidth().getPixel();
currentSize2 = secondComponent.getCurrentWidth().getPixel();
@@ -105,7 +102,7 @@ public abstract class AbstractUISplitLay
@Override
public String getColumns() {
- return VERTICAL.equals(getOrientation()) ? "1*" : getLayout2();
+ return getOrientation() == Orientation.vertical ? "1*" : getLayout2();
}
// private String getLayout2() {
@@ -118,7 +115,7 @@ public abstract class AbstractUISplitLay
@Override
public String getRows() {
- return HORIZONTAL.equals(getOrientation()) ? "1*" : getLayout2();
+ return getOrientation() == Orientation.horizontal ? "1*" : getLayout2();
}
private String getLayout2() {
@@ -127,7 +124,7 @@ public abstract class AbstractUISplitLay
public abstract String getLayout();
- public abstract String getOrientation();
+ public abstract Orientation getOrientation();
@Deprecated
public abstract Measure getCellspacing();
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SplitLayoutTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SplitLayoutTagDeclaration.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SplitLayoutTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SplitLayoutTagDeclaration.java Fri Sep 11 15:22:10 2015
@@ -32,8 +32,9 @@ import org.apache.myfaces.tobago.interna
import org.apache.myfaces.tobago.internal.taglib.declaration.HasMargins;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasSpacing;
+import org.apache.myfaces.tobago.layout.Orientation;
- /**
+/**
* Renders a SplitLayout.
* A area with two child components rendered horizontally or vertically and allows to change the
* layout relation of this two components on the client.
@@ -64,7 +65,9 @@ public interface SplitLayoutTagDeclarati
*/
@TagAttribute(required = true)
- @UIComponentTagAttribute(allowedValues = {"HORIZONTAL", "VERTICAL"})
+ @UIComponentTagAttribute(
+ type = "org.apache.myfaces.tobago.layout.Orientation",
+ allowedValues = {Orientation.STRING_HORIZONTAL, Orientation.STRING_VERTICAL})
void setOrientation(String orientation);
/**
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java Fri Sep 11 15:22:10 2015
@@ -20,6 +20,7 @@
package org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag;
import org.apache.myfaces.tobago.internal.layout.LayoutUtils;
+import org.apache.myfaces.tobago.layout.Orientation;
import org.apache.myfaces.tobago.renderkit.html.standard.standard.tag.GridLayoutRenderer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -85,14 +86,14 @@ public class SplitLayoutRenderer extends
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.startElement(HtmlElements.SPAN, layout);
writer.writeIdAttribute(id);
- writer.writeAttribute("data-tobago-split-layout", layout.getOrientation().toLowerCase(), true);
+ writer.writeAttribute("data-tobago-split-layout", layout.getOrientation().name(), false);
writer.writeAttribute("data-tobago-split-layout-containment", createDraggableContainment(layout), true);
final Style style = calculateHandleStyle(layout);
writer.writeStyleAttribute(style);
- writer.writeClassAttribute(Classes.create(layout, layout.getOrientation().toLowerCase()));
+ writer.writeClassAttribute(Classes.create(layout, layout.getOrientation().name()));
final int position;
- if (AbstractUISplitLayout.HORIZONTAL.equals(layout.getOrientation())) {
+ if (layout.getOrientation() == Orientation.horizontal) {
position = style.getLeft().getPixel();
} else {
position = style.getTop().getPixel();
@@ -116,7 +117,7 @@ public class SplitLayoutRenderer extends
final LayoutComponent secondComponent = (LayoutComponent) components.get(1);
Measure minimum;
- if (AbstractUISplitLayout.HORIZONTAL.equals(layout.getOrientation())) {
+ if (layout.getOrientation() == Orientation.horizontal) {
minimum = firstComponent.getMinimumWidth();
final int minimumSize1 = minimum != null ? minimum.getPixel() : 0;
minimum = secondComponent.getMinimumWidth();
@@ -137,7 +138,7 @@ public class SplitLayoutRenderer extends
final LayoutContainer container = (LayoutContainer) layout.getParent();
final LayoutComponent secondComponent = (LayoutComponent) LayoutUtils.findLayoutChildren(container).get(1);
final Style style = new Style();
- if (AbstractUISplitLayout.HORIZONTAL.equals(layout.getOrientation())) {
+ if (layout.getOrientation() == Orientation.horizontal) {
style.setWidth(Measure.valueOf(5));
style.setHeight(container.getCurrentHeight());
style.setLeft(Measure.valueOf(secondComponent.getLeft().subtract(5)));
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg?rev=1702499&r1=1702498&r2=1702499&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg Fri Sep 11 15:22:10 2015
@@ -317,6 +317,10 @@ DisplayProperty(property) ::= <<
<NormalProperty(property)>
>>
+OrientationProperty(property) ::= <<
+<NormalProperty(property)>
+>>
+
OrderByProperty(property) ::= <<
<NormalProperty(property)>
>>