org.fuin.utils4swing.common
Class ScreenCenterPositioner

java.lang.Object
  extended by org.fuin.utils4swing.common.AbstractScreenPositioner
      extended by org.fuin.utils4swing.common.ScreenCenterPositioner
All Implemented Interfaces:
FramePositioner

public class ScreenCenterPositioner
extends AbstractScreenPositioner

Centers a frame on the Desktop.


Constructor Summary
ScreenCenterPositioner()
          Default constructor.
ScreenCenterPositioner(int widthOffset, int heightOffset)
          Constructor with an offset.
 
Method Summary
 void position(JFrame frame)
          Set the frame's position to a new location.
 
Methods inherited from class org.fuin.utils4swing.common.AbstractScreenPositioner
checkMaxSize, getHeightOffset, getWidthOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenCenterPositioner

public ScreenCenterPositioner()
Default constructor.


ScreenCenterPositioner

public ScreenCenterPositioner(int widthOffset,
                              int heightOffset)
Constructor with an offset.

Parameters:
widthOffset - Width to adjust the horizontal position.
heightOffset - Height to adjust the vertical position.
Method Detail

position

public final void position(JFrame frame)
Set the frame's position to a new location.

Parameters:
frame - Frame to move.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.