com.sibvisions.rad.ui.qt.impl.container
Class QtInternalFrame

java.lang.Object
  extended by com.sibvisions.rad.ui.qt.impl.QtResource<C>
      extended by com.sibvisions.rad.ui.qt.impl.QtComponentBase<C>
          extended by com.sibvisions.rad.ui.qt.impl.QtComponent<C>
              extended by com.sibvisions.rad.ui.qt.impl.QtContainer<C>
                  extended by com.sibvisions.rad.ui.qt.impl.container.QtAbstractFrame<QVxMdiSubWindow>
                      extended by com.sibvisions.rad.ui.qt.impl.container.QtInternalFrame
All Implemented Interfaces:
IFrame, IInternalFrame, IToolBarPanel, IWindow, IAlignmentConstants, IComponent, IContainer, IResource

public class QtInternalFrame
extends QtAbstractFrame<QVxMdiSubWindow>
implements IInternalFrame

The QtInternalFrame is the IInternalFrame implementation for QT.

See Also:
QVxMdiSubWindow, IInternalFrame

Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.container.QtAbstractFrame
eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, menuBar
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
parent
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase
factory
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
resource
 
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
QtInternalFrame(IDesktopPanel pDesktop)
          Creates a new instance of QtInternalFrame for a specifig IDesktopPanel.
 
Method Summary
protected  void addIntern(IComponent pComponent, Object pConstraints, int pIndex)
          Internal function, for adding physical component and supporting layers.
 void addToolBar(IToolBar pToolBar)
          Adds a toolbar to this panel as last component.
 void addToolBar(IToolBar pToolBar, int pIndex)
          Adds a toolbar to this panel at a specified index.
 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).

Note: When the last displayable window within the Java virtual machine (VM) is disposed of, the VM may terminate. See AWT Threading Issues for more information.

 IToolBar getToolBar(int pIndex)
          Gets the IToolBar from a specific index.
 int getToolBarArea()
          Gets the area where the toolbar(s) are added.
 int getToolBarCount()
          Gets the number of IToolBars in this panel.
 int indexOfToolBar(IToolBar pToolBar)
          Gets the nth position of an IToolBar in this panel.
 boolean isClosable()
          Returns whether this internal frame can be closed by some user action.
 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.
 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.
 void removeAllToolBars()
          Removes all toolbars from this panel.
protected  void removeIntern(IComponent pComponent)
          Internal function, for adding physical component and supporting layers.
 void removeToolBar(int pIndex)
          Removes a toolbar from this panel.
 void removeToolBar(IToolBar pToolBar)
          Removes a toolbar from this panel.
 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 setLayoutIntern(ILayout pLayout)
          Internal function, for setting the layout.
 void setLocationRelativeTo(IComponent pComponent)
          Sets the location of the window relative to the specified component.
 void setMaximizable(boolean pMaximizable)
          Sets whether this internal frame can be maximized by some user action.
 void setMenuBar(IMenuBar pMenuBar)
          Sets the menubar for this frame.
 void setModal(boolean pModal)
          Sets the frame as modal frame.
 void setToolBarArea(int pArea)
          Sets the display area where the toolbars will be added.
 void setVisible(boolean pVisible)
          Shows or hides this component depending on the value of parameter b.
 void windowClosed()
          Sends the UIWindowEvent.WINDOW_CLOSED event to all listeners.
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.container.QtAbstractFrame
close, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, getIconImage, getMenuBar, getState, getTitle, isActive, isClosed, isDisposed, isResizable, setCursor, setIconImage, setResizable, setState, setTitle, toBack, toFront, windowActivated, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtContainer
add, add, add, add, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
addStyle, capture, getBackground, getBounds, getCursor, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyleSheet, getToolTipText, getVerticalAlignment, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setEnabled, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setResourceVisible, setSize, setToolTipText, setVerticalAlignment
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase
eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getFactory, isVisible, setFactory
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
equals, getResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.container.IInternalFrame
close, isClosed
 
Methods inherited from interface javax.rad.ui.container.IFrame
getIconImage, getMenuBar, getState, getTitle, isResizable, setIconImage, setResizable, setState, setTitle
 
Methods inherited from interface javax.rad.ui.container.IWindow
eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, toBack, toFront
 
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, isVisible, 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.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, isVisible, 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

QtInternalFrame

public QtInternalFrame(IDesktopPanel pDesktop)
Creates a new instance of QtInternalFrame for a specifig IDesktopPanel.

Parameters:
pDesktop - the desktop
Method Detail

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

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

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

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

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

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

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

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

setMenuBar

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

Specified by:
setMenuBar in interface IFrame
Parameters:
pMenuBar - the menubar being placed in the frame
See Also:
IFrame.getMenuBar()

setLocationRelativeTo

public void setLocationRelativeTo(IComponent pComponent)
Sets the location of the window relative to the specified component. If the component is not currently showing, or pComponent is null, the window is centered on the screen.

Specified by:
setLocationRelativeTo in interface IWindow
Parameters:
pComponent - the component in relation to which the window's location is determined

addToolBar

public void addToolBar(IToolBar pToolBar)
Adds a toolbar to this panel as last component.

Specified by:
addToolBar in interface IToolBarPanel
Parameters:
pToolBar - the toolbar to be added

addToolBar

public void addToolBar(IToolBar pToolBar,
                       int pIndex)
Adds a toolbar to this panel at a specified index.

Specified by:
addToolBar in interface IToolBarPanel
Parameters:
pToolBar - the toolbar to be added
pIndex - the index for the toolbar

removeToolBar

public void removeToolBar(IToolBar pToolBar)
Removes a toolbar from this panel.

Specified by:
removeToolBar in interface IToolBarPanel
Parameters:
pToolBar - the toolbar

removeToolBar

public void removeToolBar(int pIndex)
Removes a toolbar from this panel.

Specified by:
removeToolBar in interface IToolBarPanel
Parameters:
pIndex - the index

removeAllToolBars

public void removeAllToolBars()
Removes all toolbars from this panel.

Specified by:
removeAllToolBars in interface IToolBarPanel

getToolBarCount

public int getToolBarCount()
Gets the number of IToolBars in this panel.

Specified by:
getToolBarCount in interface IToolBarPanel
Returns:
the number of toolbars

getToolBar

public IToolBar getToolBar(int pIndex)
Gets the IToolBar from a specific index.

Specified by:
getToolBar in interface IToolBarPanel
Parameters:
pIndex - the index
Returns:
the toolbar at pIndex

indexOfToolBar

public int indexOfToolBar(IToolBar pToolBar)
Gets the nth position of an IToolBar in this panel.

Specified by:
indexOfToolBar in interface IToolBarPanel
Parameters:
pToolBar - the IToolBar to search
Returns:
the nth position of pToolBar in this panel or -1 if pToolBar is not added

setToolBarArea

public void setToolBarArea(int pArea)
Sets the display area where the toolbars will be added.

Specified by:
setToolBarArea in interface IToolBarPanel
Parameters:
pArea - an area constant IToolBarPanel.AREA_TOP, IToolBarPanel.AREA_LEFT, IToolBarPanel.AREA_BOTTOM, IToolBarPanel.AREA_RIGHT

getToolBarArea

public int getToolBarArea()
Gets the area where the toolbar(s) are added.

Specified by:
getToolBarArea in interface IToolBarPanel
Returns:
an area constant IToolBarPanel.AREA_TOP, IToolBarPanel.AREA_LEFT, IToolBarPanel.AREA_BOTTOM, IToolBarPanel.AREA_RIGHT

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).

Note: When the last displayable window within the Java virtual machine (VM) is disposed of, the VM may terminate. See AWT Threading Issues for more information.

Specified by:
dispose in interface IWindow
Overrides:
dispose in class QtAbstractFrame<QVxMdiSubWindow>
See Also:
IWindow.pack(), IComponent.setVisible(boolean)

windowClosed

public void windowClosed()
Sends the UIWindowEvent.WINDOW_CLOSED event to all listeners.

Overrides:
windowClosed in class QtAbstractFrame<QVxMdiSubWindow>

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
Overrides:
pack in class QtAbstractFrame<QVxMdiSubWindow>

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 QtComponentBase<QVxMdiSubWindow>
Parameters:
pVisible - if true, shows this component; otherwise, hides this component
See Also:
IComponent.isVisible()

setLayoutIntern

public void setLayoutIntern(ILayout pLayout)
Internal function, for setting the layout.

Overrides:
setLayoutIntern in class QtContainer<QVxMdiSubWindow>
Parameters:
pLayout - the layout

addIntern

protected void addIntern(IComponent pComponent,
                         Object pConstraints,
                         int pIndex)
Internal function, for adding physical component and supporting layers.

Overrides:
addIntern in class QtContainer<QVxMdiSubWindow>
Parameters:
pComponent - the Component to be added
pConstraints - an object expressing layout contraints for this
pIndex - the position in the container's list at which to insert the Component; -1 means insert at the end component
See Also:
QtContainer.add(IComponent, Object, int)

removeIntern

protected void removeIntern(IComponent pComponent)
Internal function, for adding physical component and supporting layers.

Overrides:
removeIntern in class QtContainer<QVxMdiSubWindow>
Parameters:
pComponent - the Component to be removed
See Also:
QtContainer.remove(int)


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.