org.rapla.gui.toolkit
Class FrameControllerList

java.lang.Object
  extended by org.rapla.gui.toolkit.FrameControllerList
All Implemented Interfaces:
LogEnabled

public final class FrameControllerList
extends Object
implements LogEnabled

All rapla-windows are registered on the FrameControllerList. The FrameControllerList is responsible for positioning the windows and closing all open windows on exit.


Field Summary
static String ROLE
           
 
Constructor Summary
FrameControllerList()
           
 
Method Summary
 void add(FrameController c)
          adds a window to the FrameControllerList
 void addFrameControllerListener(FrameControllerListener listener)
           
 void centerWindow(Window window)
          centers the window around the specified center
static void centerWindowOnScreen(Window window)
          centers the window around the specified center
 void closeAll()
          closes all windows registered on the FrameControllerList
 void enableLogging(Logger logger)
           
protected  void fireFrameClosed(FrameController controller)
           
protected  void fireListEmpty()
           
static void fitIntoScreen(int x, int y, Component window)
          Tries to place the window, that it fits into the screen.
 FrameControllerListener[] getFrameControllerListeners()
           
protected  Logger getLogger()
           
 Window getMainWindow()
           
static void placeRelativeToComponent(Window newWindow, Component component, Point point)
           
 void placeRelativeToMain(Window newWindow)
          places the window relative to the main-window if set.
static void placeRelativeToWindow(Window newWindow, Window owner)
          places the window relative to the owner-window.
 void remove(FrameController c)
          removes a window from the FrameControllerList
 void removeFrameControllerListener(FrameControllerListener listener)
           
 void setCenter(Container window)
          the center will be used by the centerWindow() function.
 void setCenter(Point center)
          the center will be used by the centerWindow(Window) function.
 void setMainWindow(Window window)
          the main-window will be used by the placeRelativeToMain(Window) function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE

public static final String ROLE
Constructor Detail

FrameControllerList

public FrameControllerList()
Method Detail

enableLogging

public void enableLogging(Logger logger)
Specified by:
enableLogging in interface LogEnabled

getLogger

protected Logger getLogger()

setCenter

public void setCenter(Container window)
the center will be used by the centerWindow() function.


setCenter

public void setCenter(Point center)
the center will be used by the centerWindow(Window) function.

See Also:
centerWindow(Window)

setMainWindow

public void setMainWindow(Window window)
the main-window will be used by the placeRelativeToMain(Window) function.

See Also:
placeRelativeToMain(Window)

getMainWindow

public Window getMainWindow()

placeRelativeToMain

public void placeRelativeToMain(Window newWindow)
places the window relative to the main-window if set. Otherwise the the centerWindow(Window) method is called.

Parameters:
newWindow - the window to place

add

public void add(FrameController c)
adds a window to the FrameControllerList


remove

public void remove(FrameController c)
removes a window from the FrameControllerList


closeAll

public void closeAll()
closes all windows registered on the FrameControllerList


addFrameControllerListener

public void addFrameControllerListener(FrameControllerListener listener)

removeFrameControllerListener

public void removeFrameControllerListener(FrameControllerListener listener)

getFrameControllerListeners

public FrameControllerListener[] getFrameControllerListeners()

fireFrameClosed

protected void fireFrameClosed(FrameController controller)

fireListEmpty

protected void fireListEmpty()

centerWindow

public void centerWindow(Window window)
centers the window around the specified center


centerWindowOnScreen

public static void centerWindowOnScreen(Window window)
centers the window around the specified center


fitIntoScreen

public static void fitIntoScreen(int x,
                                 int y,
                                 Component window)
Tries to place the window, that it fits into the screen.


placeRelativeToWindow

public static void placeRelativeToWindow(Window newWindow,
                                         Window owner)
places the window relative to the owner-window. The newWindow will be placed in the middle of the owner-window.

Parameters:
newWindow - the window to place
owner - the window to place into

placeRelativeToComponent

public static void placeRelativeToComponent(Window newWindow,
                                            Component component,
                                            Point point)


Copyright © 2000-2006 Rapla Team. All Rights Reseserved.