com.sibvisions.rad.ui.swing.ext
Class JVxInternalFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JInternalFrame
                  extended by com.sibvisions.rad.ui.swing.ext.JVxInternalFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class JVxInternalFrame
extends JInternalFrame

The JVxInternalFrame extends a JInternalFrame to support the modal mode and event queue blocking, like modal dialogs.

See Also:
Serialized Form

Nested Class Summary
static class JVxInternalFrame.ModalComponentListener
          The ModalComponentListener resizes the transparent panel for the modal desktop.
 
Nested classes/interfaces inherited from class javax.swing.JInternalFrame
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JVxInternalFrame()
          Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JVxInternalFrame with no title.
JVxInternalFrame(String pTitle)
          Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JVxInternalFrame with the specified title.
 
Method Summary
 void addNotify()
          
 void dispose()
          Makes this internal frame: invisible unselected closed If the frame is not already closed, this method fires an INTERNAL_FRAME_CLOSED event.
 boolean isFocusStored()
          Checks if the frame has stored a focus component.
 boolean isKeepBlocking()
          Returns the blocking option of the internal frame.
 boolean isModal()
          Returns the modal option of the internal frame.
 void pack()
          
 void remove(Component pComponent)
          
 void removeNotify()
          Notifies this component that it no longer has a parent component.
 void restoreFocus()
          Sets the focus to an already stored component or does nothing if no focus component is stored.
 void setBackground(Color pColor)
          
 void setClosable(boolean pClosable)
          
 void setEnabled(boolean pEnabled)
          
 void setFrameIcon(Icon pIcon)
          
 void setIcon(boolean pIcon)
          
 void setKeepBlocking(boolean pKeepBlocking)
          Sets the modal internal frame blocking.
 void setLocationRelativeTo(Component pComponent)
          Sets and calculates the position of this internal frame relative to another component.
 void setModal(boolean pModal)
          Sets the frame as modal frame.
 void setResizable(boolean pResizable)
          
 void setRootPane(JRootPane pContainer)
          
 void setSelected(boolean pSelected)
          
 void setTitle(String pTitle)
          
 void setUI(InternalFrameUI pUi)
          
 void setVisible(boolean pVisible)
          Makes the component visible or invisible.
 void storeFocus()
          Stores the current focus owner in an internal component.
 void toBack()
          
 void toFront()
          
 
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, paintComponent, paramString, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setGlassPane, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setRootPaneCheckingEnabled, show, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JVxInternalFrame

public JVxInternalFrame()
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JVxInternalFrame with no title.


JVxInternalFrame

public JVxInternalFrame(String pTitle)
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JVxInternalFrame with the specified title. Note that passing in a null title results in unspecified behavior and possibly an exception.

Parameters:
pTitle - the non-null String to display in the title bar
Method Detail

setUI

public void setUI(InternalFrameUI pUi)

Overrides:
setUI in class JInternalFrame

setBackground

public void setBackground(Color pColor)

Overrides:
setBackground in class JComponent

pack

public void pack()

Overrides:
pack in class JInternalFrame

setVisible

public void setVisible(boolean pVisible)
Makes the component visible or invisible.
It also handles the modal and blocking options, if set.

Overrides:
setVisible in class JComponent
Parameters:
pVisible - true to make the component visible; false to make it invisible

remove

public void remove(Component pComponent)

Overrides:
remove in class JInternalFrame

addNotify

public void addNotify()

Overrides:
addNotify in class JComponent

removeNotify

public void removeNotify()
Notifies this component that it no longer has a parent component. When this method is invoked, any KeyboardActions set up in the the chain of parent components are removed.
It also handles the modal and blocking option, if set.

Overrides:
removeNotify in class JComponent

dispose

public void dispose()
Makes this internal frame: If the frame is not already closed, this method fires an INTERNAL_FRAME_CLOSED event. The results of invoking this method are similar to setClosed(true), but dispose always succeeds in closing the internal frame and does not fire an INTERNAL_FRAME_CLOSING event.
It also handles the modal and blocking option, if set.

Overrides:
dispose in class JInternalFrame
See Also:
InternalFrameEvent.INTERNAL_FRAME_CLOSED, setVisible(boolean), setSelected(boolean), JInternalFrame.setClosed(boolean)

setSelected

public void setSelected(boolean pSelected)
                 throws PropertyVetoException

Overrides:
setSelected in class JInternalFrame
Throws:
PropertyVetoException

setEnabled

public void setEnabled(boolean pEnabled)

Overrides:
setEnabled in class JComponent

setResizable

public void setResizable(boolean pResizable)

Overrides:
setResizable in class JInternalFrame

setFrameIcon

public void setFrameIcon(Icon pIcon)

Overrides:
setFrameIcon in class JInternalFrame

setTitle

public void setTitle(String pTitle)

Overrides:
setTitle in class JInternalFrame

setClosable

public void setClosable(boolean pClosable)

Overrides:
setClosable in class JInternalFrame

setIcon

public void setIcon(boolean pIcon)
             throws PropertyVetoException

Overrides:
setIcon in class JInternalFrame
Throws:
PropertyVetoException

setRootPane

public void setRootPane(JRootPane pContainer)

Overrides:
setRootPane in class JInternalFrame

toFront

public void toFront()

Overrides:
toFront in class JInternalFrame

toBack

public void toBack()

Overrides:
toBack in class JInternalFrame

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.

Parameters:
pModal - true to set this internal frame modal, otherwise false

isModal

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

Returns:
true if the frame is modal otherwise false

setKeepBlocking

public void setKeepBlocking(boolean pKeepBlocking)
Sets the modal internal frame blocking. If a modal internal frame is blocking, the mouse events will be blocked for all lightweight children except for the modal frame.

Parameters:
pKeepBlocking - true to block all mouse events for all lightweight children, otherwise false

isKeepBlocking

public boolean isKeepBlocking()
Returns the blocking option of the internal frame.

Returns:
true if the internal frame uses mouse event blocking

setLocationRelativeTo

public void setLocationRelativeTo(Component pComponent)
Sets and calculates the position of this internal frame relative to another component. The other component should be inside the same desktop pane.

Parameters:
pComponent - the component to calculate the position

storeFocus

public void storeFocus()
Stores the current focus owner in an internal component.


isFocusStored

public boolean isFocusStored()
Checks if the frame has stored a focus component.

Returns:
true if the frame has stored an available focus component

restoreFocus

public void restoreFocus()
Sets the focus to an already stored component or does nothing if no focus component is stored.



Copyright © 2009 SIB Visions GmbH. All Rights Reserved.