teamdev.jxdesktop.ui
Interface Window

All Superinterfaces:
Screenable, UIElement

public interface Window
extends UIElement

Represents a top-level window with title and border.


Method Summary
 java.awt.image.BufferedImage getIcon()
          Returns the image that represents window icon.
 java.lang.String getTitle()
          Returns the window's title.
 boolean isActive()
          Returns true if the window is active (foreground).
 boolean isMinimized()
          Returns true if the window is minizized.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes this component.
 void setBounds(java.awt.Rectangle bounds)
          Moves and resizes this component to conform to the new bounding rectangle bounds.
 void setLocation(int x, int y)
          Moves this component to a new location.
 void setLocation(java.awt.Point location)
          Moves this component to a new location.
 void setSize(java.awt.Dimension size)
          Resizes this component so that it has width size.width and height size.height.
 void setSize(int width, int height)
          Resizes this window so that it has width width and height height.
 void toFront()
          Bring the window to front.
 
Methods inherited from interface teamdev.jxdesktop.UIElement
getChildren, getParent, isVisible, update
 
Methods inherited from interface teamdev.jxdesktop.Screenable
getBounds, getImage, getLocation, getSize
 

Method Detail

getTitle

public java.lang.String getTitle()
Returns the window's title.

Returns:
the window's title.

isMinimized

public boolean isMinimized()
Returns true if the window is minizized.

Returns:
true if the window is minizized, otherwise false.

isActive

public boolean isActive()
Returns true if the window is active (foreground).

Returns:
true if the window is active (foreground), otherwise false.

setSize

public void setSize(java.awt.Dimension size)
Resizes this component so that it has width size.width and height size.height.

Parameters:
size - the dimension specifying the new size of this component
See Also:
setSize(int, int), setBounds(java.awt.Rectangle)

setSize

public void setSize(int width,
                    int height)
Resizes this window so that it has width width and height height.

Parameters:
width - the new width of this window in pixels
height - the new height of this window in pixels
See Also:
setSize(java.awt.Dimension), setBounds(java.awt.Rectangle), Screenable.getBounds()

setLocation

public void setLocation(java.awt.Point location)
Moves this component to a new location. The top-left corner of the new location is specified by point location. Point location is given in the parent's coordinate space.

Parameters:
location - the point defining the top-left corner of the new location, given in the coordinate space of this component's parent
See Also:
Screenable.getLocation(), setBounds(java.awt.Rectangle)

setLocation

public void setLocation(int x,
                        int y)
Moves this component to a new location. The top-left corner of the new location is specified by the x and y parameters in the coordinate space of this component's parent.

Parameters:
x - the x-coordinate of the new location's top-left corner in the parent's coordinate space
y - the y-coordinate of the new location's top-left corner in the parent's coordinate space
See Also:
Screenable.getLocation(), setBounds(java.awt.Rectangle)

setBounds

public void setBounds(java.awt.Rectangle bounds)
Moves and resizes this component to conform to the new bounding rectangle bounds. This component's new position is specified by bounds.x and bounds.y, and its new size is specified by bounds.width and bounds.height

Parameters:
bounds - the new bounding rectangle for this component
See Also:
Screenable.getBounds(), setLocation(int, int), setLocation(Point), setSize(int, int), setSize(Dimension)

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this component. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Parameters:
x - the new x-coordinate of this component
y - the new y-coordinate of this component
width - the new width of this component
height - the new height of this component
See Also:
Screenable.getBounds(), setLocation(int, int), setLocation(Point), setSize(int, int), setSize(Dimension)

toFront

public void toFront()
Bring the window to front.


getIcon

public java.awt.image.BufferedImage getIcon()
Returns the image that represents window icon.

Returns:
the image that represents window icon.