59 |
{ |
{ |
60 |
super(el, X_AXIS); |
super(el, X_AXIS); |
61 |
} |
} |
62 |
|
public float getAlignment(int axis) |
63 |
|
{ |
64 |
|
// FIXME: This is very likely not 100% correct. Work this out. |
65 |
|
return 0.0F; |
66 |
|
} |
67 |
} |
} |
68 |
|
|
69 |
/** |
/** |
91 |
{ |
{ |
92 |
return new Row(getElement()); |
return new Row(getElement()); |
93 |
} |
} |
94 |
|
|
95 |
|
/** |
96 |
|
* Returns the alignment for this paragraph view for the specified axis. |
97 |
|
* For the X_AXIS the paragraph view will be aligned at it's left edge |
98 |
|
* (0.0F). For the Y_AXIS the paragraph view will be aligned at the |
99 |
|
* center of it's first row. |
100 |
|
* |
101 |
|
* @param axis the axis which is examined |
102 |
|
* |
103 |
|
* @return the alignment for this paragraph view for the specified axis |
104 |
|
*/ |
105 |
|
public float getAlignment(int axis) |
106 |
|
{ |
107 |
|
if (axis == X_AXIS) |
108 |
|
return 0.0F; |
109 |
|
else if (getViewCount() > 0) |
110 |
|
{ |
111 |
|
|
112 |
|
float prefHeight = getPreferredSpan(Y_AXIS); |
113 |
|
float firstRowHeight = getView(0).getPreferredSpan(Y_AXIS); |
114 |
|
return (firstRowHeight / 2.F) / prefHeight; |
115 |
|
} |
116 |
|
else |
117 |
|
return 0.0F; |
118 |
|
} |
119 |
} |
} |