net.sf.ecl.datepicker.util
Class ControlHelper

java.lang.Object
  extended by net.sf.ecl.datepicker.util.ControlHelper

public final class ControlHelper
extends Object

The utility class that provides miscellaneous Controloperations.


Method Summary
static void applyFont(Control control, Font font)
           
static boolean contains(Composite composite, Control control, boolean recursive)
           
static void fixMacOSXComboBugIn(Composite composite)
           
static void hook(Composite composite, int[] events, Listener listener)
          Hooks the given composite and all its children recursive to listen event of the given types.
static void hook(Composite composite, int event, Listener listener)
          Hooks the given composite and all its children recursive to listen event of the given type.
static void layout(Composite composite, boolean up)
           
static void layout(Composite composite, boolean changed, boolean up)
           
static void reparent(Control control, Composite newParent)
          Reparents the given control to the new parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

applyFont

public static void applyFont(Control control,
                             Font font)
Parameters:
control -
font -

contains

public static boolean contains(Composite composite,
                               Control control,
                               boolean recursive)
Parameters:
composite -
control -
recursive -
Returns:

fixMacOSXComboBugIn

public static void fixMacOSXComboBugIn(Composite composite)
Parameters:
composite -

hook

public static void hook(Composite composite,
                        int event,
                        Listener listener)
Hooks the given composite and all its children recursive to listen event of the given type. All hooked widgets will be automatically unhooked when disposed.

Parameters:
composite - the composite
event - the event type
listener - the event listener

hook

public static void hook(Composite composite,
                        int[] events,
                        Listener listener)
Hooks the given composite and all its children recursive to listen event of the given types. All hooked widgets will be automatically unhooked when disposed.

Parameters:
composite - the composite
events - the event types
listener - the event listener

layout

public static void layout(Composite composite,
                          boolean up)
Parameters:
composite -
up -

layout

public static void layout(Composite composite,
                          boolean changed,
                          boolean up)
Parameters:
composite -
changed -
up -

reparent

public static void reparent(Control control,
                            Composite newParent)
Reparents the given control to the new parent.

Parameters:
control - the control to change parent
newParent - the new control's parent