javax.rad.ui.container
Interface IFrame

All Superinterfaces:
IComponent, IContainer, INamedObject, IResource, IToolBarPanel, IWindow
All Known Subinterfaces:
IInternalFrame, ILauncher
All Known Implementing Classes:
About, AbstractFrame, Error, Login, Message, SwingAbstractFrame, SwingApplet.SwingAppletLauncher, SwingApplication, SwingFrame, SwingInternalFrame, UIFrame, UIInternalFrame, UILauncher

public interface IFrame
extends IWindow, IToolBarPanel

Platform and technology independent Frame definition. It is designed for use with AWT, Swing, SWT, JSP, JSF,... .

See Also:
Frame, JFrame

Field Summary
static int ICONIFIED
          This state bit indicates that frame is iconified.
static int MAXIMIZED_BOTH
          This state bit mask indicates that frame is fully maximized (that is both horizontally and vertically).
static int MAXIMIZED_HORIZ
          This state bit indicates that frame is maximized in the horizontal direction.
static int MAXIMIZED_VERT
          This state bit indicates that frame is maximized in the vertical direction.
static int NORMAL
          Frame is in the "normal" state.
 
Fields inherited from interface javax.rad.ui.container.IToolBarPanel
AREA_BOTTOM, AREA_LEFT, AREA_RIGHT, AREA_TOP
 
Method Summary
 IImage getIconImage()
          Returns the image to be displayed as the icon for this frame.
 IMenuBar getMenuBar()
          Returns the menubar set on this frame.
 int getState()
          Gets the state of this frame (obsolete).
 String getTitle()
          Gets the title of the frame.
 boolean isResizable()
          Indicates whether this frame is resizable by the user.
 void setIconImage(IImage pIconImage)
          Sets the image to be displayed as the icon for this window.
 void setMenuBar(IMenuBar pMenuBar)
          Sets the menubar for this frame.
 void setResizable(boolean pResizable)
          Sets whether this frame is resizable by the user.
 void setState(int pState)
          Sets the state of this frame (obsolete).
 void setTitle(String pTitle)
          Sets the title for this frame to the specified string.
 
Methods inherited from interface javax.rad.ui.container.IWindow
centerRelativeTo, dispose, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack, toBack, toFront
 
Methods inherited from interface javax.rad.ui.container.IToolBarPanel
addToolBar, addToolBar, getToolBar, getToolBarArea, getToolBarCount, indexOfToolBar, removeAllToolBars, removeToolBar, removeToolBar, setToolBarArea
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

NORMAL

static final int NORMAL
Frame is in the "normal" state. This symbolic constant names a frame state with all state bits cleared.

See Also:
setState(int), getState(), Constant Field Values

ICONIFIED

static final int ICONIFIED
This state bit indicates that frame is iconified.

See Also:
setState(int), getState(), Constant Field Values

MAXIMIZED_HORIZ

static final int MAXIMIZED_HORIZ
This state bit indicates that frame is maximized in the horizontal direction.

See Also:
setState(int), getState(), Constant Field Values

MAXIMIZED_VERT

static final int MAXIMIZED_VERT
This state bit indicates that frame is maximized in the vertical direction.

See Also:
setState(int), getState(), Constant Field Values

MAXIMIZED_BOTH

static final int MAXIMIZED_BOTH
This state bit mask indicates that frame is fully maximized (that is both horizontally and vertically). It is just a convenience alias for MAXIMIZED_VERT | MAXIMIZED_HORIZ.

Note that the correct test for frame being fully maximized is

     (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
 

To test is frame is maximized in some direction use

     (state & Frame.MAXIMIZED_BOTH) != 0
 

See Also:
setState(int), getState(), Constant Field Values
Method Detail

getTitle

String getTitle()
Gets the title of the frame. The title is displayed in the frame's border.

Returns:
the title of this frame, or an empty string ("") if this frame doesn't have a title.
See Also:
setTitle(String)

setTitle

void setTitle(String pTitle)
Sets the title for this frame to the specified string.

Parameters:
pTitle - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
See Also:
getTitle()

getIconImage

IImage getIconImage()
Returns the image to be displayed as the icon for this frame.

Returns:
the icon image for this frame, or null if this frame doesn't have an icon image.
See Also:
setIconImage(IImage)

setIconImage

void setIconImage(IImage pIconImage)
Sets the image to be displayed as the icon for this window.

Parameters:
pIconImage - the icon image to be displayed. If this parameter is null then the icon image is set to the default image, which may vary with platform.
See Also:
getIconImage()

getState

int getState()
Gets the state of this frame (obsolete).

In older versions of JDK a frame state could only be NORMAL or ICONIFIED. Since JDK 1.4 set of supported frame states is expanded and frame state is represented as a bitwise mask.

For compatibility with old programs this method still returns Frame.NORMAL and Frame.ICONIFIED but it only reports the iconic state of the frame, other aspects of frame state are not reported by this method.

Returns:
Frame.NORMAL or Frame.ICONIFIED.
See Also:
setState(int)

setState

void setState(int pState)
Sets the state of this frame (obsolete).

In older versions of JDK a frame state could only be NORMAL or ICONIFIED. Since JDK 1.4 set of supported frame states is expanded and frame state is represented as a bitwise mask.

For compatibility with old programs this method still accepts Frame.NORMAL and Frame.ICONIFIED but it only changes the iconic state of the frame, other aspects of frame state are not affected by this method.

Parameters:
pState - either Frame.NORMAL or Frame.ICONIFIED.
See Also:
getState(), setState(int)

isResizable

boolean isResizable()
Indicates whether this frame is resizable by the user. By default, all frames are initially resizable.

Returns:
true if the user can resize this frame; false otherwise.
See Also:
setResizable(boolean)

setResizable

void setResizable(boolean pResizable)
Sets whether this frame is resizable by the user.

Parameters:
pResizable - true if this frame is resizable; false otherwise.
See Also:
isResizable()

setMenuBar

void setMenuBar(IMenuBar pMenuBar)
Sets the menubar for this frame.

Parameters:
pMenuBar - the menubar being placed in the frame
See Also:
getMenuBar()

getMenuBar

IMenuBar getMenuBar()
Returns the menubar set on this frame.

Returns:
the menubar for this frame
See Also:
setMenuBar(javax.rad.ui.menu.IMenuBar)


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.