com.itmill.toolkit.ui
Class AlignmentUtils

java.lang.Object
  extended by com.itmill.toolkit.ui.AlignmentUtils

public class AlignmentUtils
extends Object

Helper class for setting alignments using a short notation. Supported notation is: t,top for top alignment m,middle for vertical center alignment b,bottom for bottom alignment l,left for left alignment c,center for horizontal center alignment r,right for right alignment


Constructor Summary
AlignmentUtils()
           
 
Method Summary
static void setComponentAlignment(Layout.AlignmentHandler parent, Component component, String alignment)
          Set the alignment for the component using short notation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlignmentUtils

public AlignmentUtils()
Method Detail

setComponentAlignment

public static void setComponentAlignment(Layout.AlignmentHandler parent,
                                         Component component,
                                         String alignment)
                                  throws IllegalArgumentException
Set the alignment for the component using short notation

Parameters:
parent -
component -
alignment - String containing one or two alignment strings. If short notation "r","t",etc is used valid strings include "r","rt","tr","t". If the longer notation is used the alignments should be separated by a space e.g. "right","right top","top right","top". It is valid to mix short and long notation but they must be separated by a space e.g. "r top".
Throws:
IllegalArgumentException


Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.