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:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class JVxInternalFrame
extends javax.swing.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
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.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(java.lang.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.
 java.awt.Container getContentPane()
          
 java.awt.Component getMostRecentFocusOwner()
          
 java.awt.Component getPreviousFocusOwner()
          Gets the previous focus owner.
 TranslationMap getTranslation()
          Gets the translation mapping.
 boolean isDisposed()
          Gets whether this frame was disposed.
 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.
 boolean isSelected()
          
 void pack()
          
 void remove(java.awt.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 restoreSubcomponentFocus()
          
 void setBackground(java.awt.Color pColor)
          
 void setClosable(boolean pClosable)
          
 void setEnabled(boolean pEnabled)
          
 void setFrameIcon(javax.swing.Icon pIcon)
          
 void setIcon(boolean pIcon)
          
 void setKeepBlocking(boolean pKeepBlocking)
          Sets the modal internal frame blocking.
 void setLocationRelativeTo(java.awt.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(javax.swing.JRootPane pContainer)
          
 void setSelected(boolean pSelected)
          
 void setTitle(java.lang.String pTitle)
          
 void setTranslation(TranslationMap pTranslation)
          Sets the translation mapping.
 void setUI(javax.swing.plaf.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, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, moveToBack, moveToFront, paintComponent, paramString, removeInternalFrameListener, reshape, 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(java.lang.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(javax.swing.plaf.InternalFrameUI pUi)

Overrides:
setUI in class javax.swing.JInternalFrame

setBackground

public void setBackground(java.awt.Color pColor)

Overrides:
setBackground in class javax.swing.JComponent

pack

public void pack()

Overrides:
pack in class javax.swing.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 javax.swing.JComponent
Parameters:
pVisible - true to make the component visible; false to make it invisible

remove

public void remove(java.awt.Component pComponent)

Overrides:
remove in class javax.swing.JInternalFrame

addNotify

public void addNotify()

Overrides:
addNotify in class javax.swing.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 javax.swing.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 javax.swing.JInternalFrame
See Also:
InternalFrameEvent.INTERNAL_FRAME_CLOSED, setVisible(boolean), setSelected(boolean), JInternalFrame.setClosed(boolean)

getMostRecentFocusOwner

public java.awt.Component getMostRecentFocusOwner()

Overrides:
getMostRecentFocusOwner in class javax.swing.JInternalFrame

getContentPane

public java.awt.Container getContentPane()

Specified by:
getContentPane in interface javax.swing.RootPaneContainer
Overrides:
getContentPane in class javax.swing.JInternalFrame

isSelected

public boolean isSelected()

Overrides:
isSelected in class javax.swing.JInternalFrame

setSelected

public void setSelected(boolean pSelected)
                 throws java.beans.PropertyVetoException

Overrides:
setSelected in class javax.swing.JInternalFrame
Throws:
java.beans.PropertyVetoException

setEnabled

public void setEnabled(boolean pEnabled)

Overrides:
setEnabled in class javax.swing.JComponent

setResizable

public void setResizable(boolean pResizable)

Overrides:
setResizable in class javax.swing.JInternalFrame

setFrameIcon

public void setFrameIcon(javax.swing.Icon pIcon)

Overrides:
setFrameIcon in class javax.swing.JInternalFrame

setTitle

public void setTitle(java.lang.String pTitle)

Overrides:
setTitle in class javax.swing.JInternalFrame

setClosable

public void setClosable(boolean pClosable)

Overrides:
setClosable in class javax.swing.JInternalFrame

setIcon

public void setIcon(boolean pIcon)
             throws java.beans.PropertyVetoException

Overrides:
setIcon in class javax.swing.JInternalFrame
Throws:
java.beans.PropertyVetoException

setRootPane

public void setRootPane(javax.swing.JRootPane pContainer)

Overrides:
setRootPane in class javax.swing.JInternalFrame

toFront

public void toFront()

Overrides:
toFront in class javax.swing.JInternalFrame

toBack

public void toBack()

Overrides:
toBack in class javax.swing.JInternalFrame

restoreSubcomponentFocus

public void restoreSubcomponentFocus()

Overrides:
restoreSubcomponentFocus in class javax.swing.JInternalFrame

getPreviousFocusOwner

public java.awt.Component getPreviousFocusOwner()
Gets the previous focus owner. This is available in case of a modal dialog, otherwise it is null.

Returns:
the previous focus owner

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(java.awt.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.


isDisposed

public boolean isDisposed()
Gets whether this frame was disposed.

Returns:
true if this frame was disposed, false otherwise

setTranslation

public void setTranslation(TranslationMap pTranslation)
Sets the translation mapping.

Parameters:
pTranslation - the translation mapping

getTranslation

public TranslationMap getTranslation()
Gets the translation mapping.

Returns:
the translation mapping


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.