return (ratio == null) ? 0 : ratio.floatValue();
}
+ /**
+ * Sets the component alignment using a short hand string notation.
+ *
+ * @deprecated Replaced by
+ * {@link #setComponentAlignment(Component, Alignment)}
+ *
+ * @param component
+ * A child component in this layout
+ * @param alignment
+ * A short hand notation described in {@link AlignmentUtils}
+ */
+ @Deprecated
public void setComponentAlignment(Component component, String alignment) {
AlignmentUtils.setComponentAlignment(this, component, alignment);
}
*
* r,right for right alignment
*
+ * @deprecated {@code AlignmentUtils} has been replaced by {@link Alignment}.
*/
-@SuppressWarnings("serial")
+@SuppressWarnings({ "serial" })
+@Deprecated
public class AlignmentUtils implements Serializable {
private static int horizontalMask = AlignmentHandler.ALIGNMENT_LEFT
| AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER
| AlignmentHandler.ALIGNMENT_RIGHT;
+
private static int verticalMask = AlignmentHandler.ALIGNMENT_TOP
| AlignmentHandler.ALIGNMENT_VERTICAL_CENTER
| AlignmentHandler.ALIGNMENT_BOTTOM;
return null;
}
+ /**
+ * Sets the component alignment using a short hand string notation.
+ *
+ * @deprecated Replaced by
+ * {@link #setComponentAlignment(Component, Alignment)}
+ *
+ * @param component
+ * A child component in this layout
+ * @param alignment
+ * A short hand notation described in {@link AlignmentUtils}
+ */
+ @Deprecated
public void setComponentAlignment(Component component, String alignment) {
AlignmentUtils.setComponentAlignment(this, component, alignment);
}