*/
protected String renderSeparatedComponent(MComponent component, String separator)
{
StringBuffer rendered = new StringBuffer();
MContainer container = component.getParent();
try
{
Object constraints = container.getConstraints(component);
// Handle improper contraint objects.
if (!(constraints instanceof MLayout.Alignment))
{
if (constraints != null)
{
constraints = container.getLayout().getAlignment();
System.out.println(new DebugString("MBoxLayout only supports only constraint objects of type Alignment. Use BoxLayout.LEFT, .CENTER, and .RIGHT for constraints with this LayoutManager. Defaulting to " + (MLayout.Alignment)constraints) + ".");
}
else
{
constraints = container.getLayout().getAlignment();
}
}
MBoxLayout layout = (MBoxLayout)container.getLayout();
final int lastComponent = (container.getComponentCount() - 1);
final int componentIndex = container.getComponentIndex(component);
switch (layout.getAxis())
{
// X axis
case MBoxLayout.X_AXIS: