com.sibvisions.rad.ui.web.impl.container
Class WebInternalFrame

java.lang.Object
  extended by com.sibvisions.rad.ui.web.impl.WebResource
      extended by com.sibvisions.rad.ui.web.impl.WebComponent
          extended by com.sibvisions.rad.ui.web.impl.WebContainer
              extended by com.sibvisions.rad.ui.web.impl.container.WebToolBarPanel
                  extended by com.sibvisions.rad.ui.web.impl.container.AbstractWebWindow
                      extended by com.sibvisions.rad.ui.web.impl.container.AbstractWebFrame
                          extended by com.sibvisions.rad.ui.web.impl.container.WebInternalFrame
All Implemented Interfaces:
IFrame, IInternalFrame, IToolBarPanel, IWindow, IAlignmentConstants, IComponent, IContainer, IResource

public class WebInternalFrame
extends AbstractWebFrame
implements IInternalFrame

Web server implementation of IInternalFrame.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.container.AbstractWebFrame
menuBar
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.container.WebToolBarPanel
toolBarPanel
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebContainer
components
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
componentId
 
Fields inherited from interface javax.rad.ui.container.IFrame
ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, NORMAL
 
Fields inherited from interface javax.rad.ui.container.IToolBarPanel
AREA_BOTTOM, AREA_LEFT, AREA_RIGHT, AREA_TOP
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
WebInternalFrame(IDesktopPanel pDesktopPanel)
          Creates a new instance of WebInternalFrame.
 
Method Summary
 void close()
          Closes this internal frame.
 void dispose()
          Releases all of the native screen resources used by this IWindow, its subcomponents, and all of its owned children.
 boolean isActive()
          Returns whether this IWindow is active.
 boolean isClosable()
          Returns whether this internal frame can be closed by some user action.
 boolean isClosed()
          Returns whether this IInternalFrame is currently closed.
 boolean isDisposed()
          Checks whether the window is disposed already.
 boolean isIconifiable()
          Returns whether this internal frame can be iconified by some user action.
 boolean isMaximizable()
          Returns whether this internal frame can be maximized by some user action.
 boolean isModal()
          Returns the modal option of the internal frame.
 boolean isVisible()
          Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such as Frame objects.
 void pack()
          Causes this IWindow to be sized to fit the preferred size and layouts of its subcomponents.
 void setClosable(boolean pClosable)
          Sets whether this internal frame can be closed by some user action.
 void setIconifiable(boolean pIconifiable)
          Sets whether this internal frame can be iconified by some user action.
 void setMaximizable(boolean pMaximizable)
          Sets whether this internal frame can be maximized by some user action.
 void setModal(boolean pModal)
          Sets the frame as modal frame.
 void setVisible(boolean pVisible)
          Shows or hides this component depending on the value of parameter b.
 void toBack()
          If this IWindow is visible, sends this IWindow to the back and may cause it to lose focus or activation if it is the focused or active Window.
 void toFront()
          If this IWindow is visible, brings this IWindow to the front and may make it the focused Window.
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.container.AbstractWebFrame
addPanelIntern, getIconImage, getMenuBar, getState, getTitle, getToolBarArea, isResizable, setIconImage, setMenuBar, setResizable, setState, setTitle, setToolBarArea
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.container.AbstractWebWindow
eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, setLocationRelativeTo
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.container.WebToolBarPanel
add, addToolBar, addToolBar, getToolBar, getToolBarCount, indexOfToolBar, remove, removeAllToolBars, removePanelIntern, removeToolBar, removeToolBar, setLayout
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebContainer
add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, finalize, getAsString, getBackground, getBounds, getChangedProperties, getComponentId, getComponentName, getConstraints, getCursor, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getProperty, getSize, getToolTipText, getVerticalAlignment, isBackgroundSet, isChanged, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setComponentId, setConstraints, setCursor, setEnabled, setFactory, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setProperty, setProperty, setSize, setToolTipText, setVerticalAlignment
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebResource
getNullableAsString, getResource, setAsString, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.container.IFrame
getIconImage, getMenuBar, getState, getTitle, isResizable, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from interface javax.rad.ui.container.IWindow
eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, setLocationRelativeTo
 
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, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
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, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

WebInternalFrame

public WebInternalFrame(IDesktopPanel pDesktopPanel)
Creates a new instance of WebInternalFrame.

Parameters:
pDesktopPanel - the associated desktop for the internal frame
See Also:
IInternalFrame, IDesktopPanel
Method Detail

isMaximizable

public boolean isMaximizable()
Returns whether this internal frame can be maximized by some user action.

Specified by:
isMaximizable in interface IInternalFrame
Returns:
true if this internal frame can be maximized

setMaximizable

public void setMaximizable(boolean pMaximizable)
Sets whether this internal frame can be maximized by some user action.

Specified by:
setMaximizable in interface IInternalFrame
Parameters:
pMaximizable - a boolean value, where true means this internal frame can be maximized

isClosable

public boolean isClosable()
Returns whether this internal frame can be closed by some user action.

Specified by:
isClosable in interface IInternalFrame
Returns:
true if this internal frame can be closed

setClosable

public void setClosable(boolean pClosable)
Sets whether this internal frame can be closed by some user action.

Specified by:
setClosable in interface IInternalFrame
Parameters:
pClosable - a boolean value, where true means this internal frame can be closed

isIconifiable

public boolean isIconifiable()
Returns whether this internal frame can be iconified by some user action.

Specified by:
isIconifiable in interface IInternalFrame
Returns:
true if this internal frame can be iconified

setIconifiable

public void setIconifiable(boolean pIconifiable)
Sets whether this internal frame can be iconified by some user action.

Specified by:
setIconifiable in interface IInternalFrame
Parameters:
pIconifiable - a boolean value, where true means this internal frame can be iconified

isModal

public boolean isModal()
Returns the modal option of the internal frame.

Specified by:
isModal in interface IInternalFrame
Returns:
true if the frame is modal otherwise false

setModal

public void setModal(boolean pModal)
Sets the frame as modal frame. When a modal frame is visible it's not possible to use the underlaying components.

Specified by:
setModal in interface IInternalFrame
Parameters:
pModal - true to set this internal frame modal, otherwise false

isVisible

public boolean isVisible()
Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such as Frame objects.

Specified by:
isVisible in interface IComponent
Overrides:
isVisible in class WebComponent
Returns:
true if the component is visible, false otherwise
See Also:
IComponent.setVisible(boolean)

setVisible

public void setVisible(boolean pVisible)
Shows or hides this component depending on the value of parameter b.

Specified by:
setVisible in interface IComponent
Overrides:
setVisible in class WebComponent
Parameters:
pVisible - if true, shows this component; otherwise, hides this component
See Also:
IComponent.isVisible()

isClosed

public boolean isClosed()
Returns whether this IInternalFrame is currently closed.

Specified by:
isClosed in interface IInternalFrame
Returns:
true if this internal frame is closed, false otherwise

close

public void close()
Closes this internal frame. If the internal frame is already closed, this method does nothing and returns immediately. Otherwise, this method begins by firing an windowClosing event. This method finishes by making the internal frame invisible and unselected, and then firing an windowClosed event.

Specified by:
close in interface IInternalFrame
See Also:
IInternalFrame.isClosed(), IWindow.dispose()

pack

public void pack()
Causes this IWindow to be sized to fit the preferred size and layouts of its subcomponents. If the window and/or its owner are not yet displayable, both are made displayable before calculating the preferred size. The IWindow will be validated after the preferredSize is calculated.

Specified by:
pack in interface IWindow

dispose

public void dispose()
Releases all of the native screen resources used by this IWindow, its subcomponents, and all of its owned children. That is, the resources for these IComponents will be destroyed, any memory they consume will be returned to the OS, and they will be marked as undisplayable.

The IWindow and its subcomponents can be made displayable again by rebuilding the native resources with a subsequent call to pack or show. The states of the recreated Window and its subcomponents will be identical to the states of these objects at the point where the IWindow was disposed (not accounting for additional modifications between those actions).

Specified by:
dispose in interface IWindow
See Also:
IWindow.pack(), IComponent.setVisible(boolean)

isDisposed

public boolean isDisposed()
Checks whether the window is disposed already.

Specified by:
isDisposed in interface IWindow
Returns:
true if the window is disposed, otherwiese false

isActive

public boolean isActive()
Returns whether this IWindow is active. Only a Frame or a Dialog may be active. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.

Specified by:
isActive in interface IWindow
Returns:
whether this is the active Window.

toFront

public void toFront()
If this IWindow is visible, brings this IWindow to the front and may make it the focused Window.

Places this IWindow at the top of the stacking order and shows it in front of any other Windows in this VM. No action will take place if this Window is not visible. Some platforms do not allow Windows which own other Windows to appear on top of those owned Windows. Some platforms may not permit this VM to place its Windows above windows of native applications, or Windows of other VMs. This permission may depend on whether a Window in this VM is already focused. Every attempt will be made to move this Window as high as possible in the stacking order; however, developers should not assume that this method will move this Window above all other windows in every situation.

Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is the focused or active Window until this Window receives a WINDOW_GAINED_FOCUS or WINDOW_ACTIVATED event. On platforms where the top-most window is the focused window, this method will probably focus this Window, if it is not already focused. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.

If this method causes this Window to be focused, and this Window is a Frame or a Dialog, it will also become activated. If this Window is focused, but it is not a Frame or a Dialog, then the first Frame or Dialog that is an owner of this Window will be activated.

If this window is blocked by modal dialog, then the blocking dialog is brought to the front and remains above the blocked window.

Specified by:
toFront in interface IWindow
See Also:
IWindow.toBack()

toBack

public void toBack()
If this IWindow is visible, sends this IWindow to the back and may cause it to lose focus or activation if it is the focused or active Window.

Places this IWindow at the bottom of the stacking order and shows it behind any other Windows in this VM. No action will take place is this Window is not visible. Some platforms do not allow Windows which are owned by other Windows to appear below their owners. Every attempt will be made to move this Window as low as possible in the stacking order; however, developers should not assume that this method will move this Window below all other windows in every situation.

Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is no longer the focused or active Window until this Window receives a WINDOW_LOST_FOCUS or WINDOW_DEACTIVATED event. On platforms where the top-most window is the focused window, this method will probably cause this Window to lose focus. In that case, the next highest, focusable Window in this VM will receive focus. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.

Specified by:
toBack in interface IWindow
See Also:
IWindow.toFront()


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.