Class BasicInternalFrameUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.InternalFrameUI
javax.swing.plaf.basic.BasicInternalFrameUI
- Direct Known Subclasses:
MetalInternalFrameUI, SynthInternalFrameUI
A basic L&F implementation of JInternalFrame.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classBasic internal frame listener.protected classListens for border adjustments.protected classComponent handler.protected classGlass pane dispatcher.classInternal frame layout.classInternal frame property change listener. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MouseInputAdapterBorder listenerprotected ComponentListenerComponent listenerprotected JComponentEast paneprotected JInternalFrameframeprotected MouseInputListenerGlass pane dispatcherprotected LayoutManagerInternal frame layoutprotected JComponentNorth paneprotected KeyStrokeDeprecated.As of Java 2 platform v1.3.protected PropertyChangeListenerProperty change listenerprotected JComponentSouth paneprotected BasicInternalFrameTitlePaneTitle paneprotected JComponentWest pane -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method is called when the frame becomes selected.protected voidThis method is called when the user wants to close the frame.protected MouseInputAdapterCreates the border listener.protected ComponentListenerCreates a component listener.protected DesktopManagerCreates the desktop manager.protected JComponentCreates the east pane.protected MouseInputListenerCreates aGlassPaneDispatcher.protected voidCreates the internal frame listener.protected LayoutManagerCreates the layout manager.protected JComponentCreates the north pane.protected PropertyChangeListenerCreates the property change listener.protected JComponentCreates the north pane.static ComponentUIReturns a component UI.protected JComponentCreates the west pane.protected voidThis method is called when the frame is no longer selected.protected voidThis method is called when the user wants to deiconify the frame.protected voidDeinstalls the mouse handlers.protected DesktopManagerReturns the proper DesktopManager.Returns the east pane.Returns the maximum size.Returns the minimum size.Returns the north pane.Returns the preferred size.Returns the south pane.Returns the west pane.protected voidThis method is called when the user wants to iconify the frame.protected voidInstalls the components.protected voidInstalls the defaults.protected voidInstalls the keyboard actions.protected voidInstalls the listeners.protected voidInstalls the mouse handlers.voidInstalls the UI.final booleanReturns whether or no the key binding is active.protected final booleanReturns whether or no the key binding is registered.protected voidThis method is called when the user wants to maximize the frame.protected voidThis method is called when the user wants to minimize the frame.protected voidreplacePane(JComponent currentPane, JComponent newPane) Installs necessary mouse handlers onnewPaneand adds it to the frame.voidSets the east pane.protected final voidsetKeyBindingActive(boolean b) Sets the key binding activity.protected final voidsetKeyBindingRegistered(boolean b) Sets the key binding registration.voidSets the north pane.voidSets the south pane.protected voidSetup the menu close key.protected voidSetup the menu open key.voidSets the west pane.protected voidUninstalls the components.protected voidUninstalls the defaults.protected voidUninstalls the keyboard actions.protected voidUninstalls the listeners.voidUninstalls the UI.Methods declared in class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, updateModifier and TypeMethodDescriptionbooleancontains(JComponent c, int x, int y) Returnstrueif the specified x,y location is contained within the look and feel's defined shape of the specified component.getAccessibleChild(JComponent c, int i) Returns theithAccessiblechild of the object.intReturns the number of accessible children in the object.intgetBaseline(JComponent c, int width, int height) Returns the baseline.Returns an enum indicating how the baseline of the component changes as the size changes.voidpaint(Graphics g, JComponent c) Paints the specified component appropriately for the look and feel.voidupdate(Graphics g, JComponent c) Notifies this UI delegate that it is time to paint the specified component.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Field Details
-
frame
frame -
borderListener
Border listener -
propertyChangeListener
Property change listener -
internalFrameLayout
Internal frame layout -
componentListener
Component listener -
glassPaneDispatcher
Glass pane dispatcher -
northPane
North pane -
southPane
South pane -
westPane
West pane -
eastPane
East pane -
titlePane
Title pane -
openMenuKey
Deprecated.As of Java 2 platform v1.3.As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
-
-
Constructor Details
-
BasicInternalFrameUI
Constructs aBasicInternalFrameUI.- Parameters:
b- the internal frame
-
-
Method Details
-
createUI
Returns a component UI.- Parameters:
b- a component- Returns:
- a component UI
-
installUI
Installs the UI.- Overrides:
installUIin classComponentUI- Parameters:
c- the component- See Also:
-
uninstallUI
Uninstalls the UI.- Overrides:
uninstallUIin classComponentUI- Parameters:
c- the component- See Also:
-
installDefaults
protected void installDefaults()Installs the defaults. -
installKeyboardActions
protected void installKeyboardActions()Installs the keyboard actions. -
installComponents
protected void installComponents()Installs the components. -
installListeners
protected void installListeners()Installs the listeners.- Since:
- 1.3
-
uninstallDefaults
protected void uninstallDefaults()Uninstalls the defaults. -
uninstallComponents
protected void uninstallComponents()Uninstalls the components. -
uninstallListeners
protected void uninstallListeners()Uninstalls the listeners.- Since:
- 1.3
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()Uninstalls the keyboard actions. -
createLayoutManager
Creates the layout manager.- Returns:
- the layout manager
-
createPropertyChangeListener
Creates the property change listener.- Returns:
- the property change listener
-
getPreferredSize
Returns the preferred size.- Overrides:
getPreferredSizein classComponentUI- Parameters:
x- the component- Returns:
- the preferred size
- See Also:
-
getMinimumSize
Returns the minimum size.- Overrides:
getMinimumSizein classComponentUI- Parameters:
x- the component- Returns:
- the minimum size
- See Also:
-
getMaximumSize
Returns the maximum size.- Overrides:
getMaximumSizein classComponentUI- Parameters:
x- the component- Returns:
- the maximum size
- See Also:
-
replacePane
Installs necessary mouse handlers onnewPaneand adds it to the frame. Reverse process for thecurrentPane.- Parameters:
currentPane- thisJComponentis the current pane being viewed that has mouse handlers installednewPane- thisJComponentis the pane which will be added and have mouse handlers installed
-
deinstallMouseHandlers
Deinstalls the mouse handlers.- Parameters:
c- the component
-
installMouseHandlers
Installs the mouse handlers.- Parameters:
c- the component
-
createNorthPane
Creates the north pane.- Parameters:
w- the internal frame- Returns:
- the north pane
-
createSouthPane
Creates the north pane.- Parameters:
w- the internal frame- Returns:
- the north pane
-
createWestPane
Creates the west pane.- Parameters:
w- the internal frame- Returns:
- the west pane
-
createEastPane
Creates the east pane.- Parameters:
w- the internal frame- Returns:
- the east pane
-
createBorderListener
Creates the border listener.- Parameters:
w- the internal frame- Returns:
- the border listener
-
createInternalFrameListener
protected void createInternalFrameListener()Creates the internal frame listener. -
isKeyBindingRegistered
protected final boolean isKeyBindingRegistered()Returns whether or no the key binding is registered.- Returns:
- whether or no the key binding is registered
-
setKeyBindingRegistered
protected final void setKeyBindingRegistered(boolean b) Sets the key binding registration.- Parameters:
b- new value for key binding registration
-
isKeyBindingActive
public final boolean isKeyBindingActive()Returns whether or no the key binding is active.- Returns:
- whether or no the key binding is active
-
setKeyBindingActive
protected final void setKeyBindingActive(boolean b) Sets the key binding activity.- Parameters:
b- new value for key binding activity
-
setupMenuOpenKey
protected void setupMenuOpenKey()Setup the menu open key. -
setupMenuCloseKey
protected void setupMenuCloseKey()Setup the menu close key. -
getNorthPane
-
setNorthPane
-
getSouthPane
-
setSouthPane
-
getWestPane
-
setWestPane
-
getEastPane
-
setEastPane
-
getDesktopManager
Returns the proper DesktopManager. Calls getDesktopPane() to find the JDesktop component and returns the desktopManager from it. If this fails, it will return a default DesktopManager that should work in arbitrary parents.- Returns:
- the proper DesktopManager
-
createDesktopManager
Creates the desktop manager.- Returns:
- the desktop manager
-
closeFrame
This method is called when the user wants to close the frame. TheplayCloseSoundAction is fired. This action is delegated to the desktopManager.- Parameters:
f- theJInternalFramebeing viewed
-
maximizeFrame
This method is called when the user wants to maximize the frame. TheplayMaximizeSoundAction is fired. This action is delegated to the desktopManager.- Parameters:
f- theJInternalFramebeing viewed
-
minimizeFrame
This method is called when the user wants to minimize the frame. TheplayRestoreDownSoundAction is fired. This action is delegated to the desktopManager.- Parameters:
f- theJInternalFramebeing viewed
-
iconifyFrame
This method is called when the user wants to iconify the frame. TheplayMinimizeSoundAction is fired. This action is delegated to the desktopManager.- Parameters:
f- theJInternalFramebeing viewed
-
deiconifyFrame
This method is called when the user wants to deiconify the frame. TheplayRestoreUpSoundAction is fired. This action is delegated to the desktopManager.- Parameters:
f- theJInternalFramebeing viewed
-
activateFrame
This method is called when the frame becomes selected. This action is delegated to the desktopManager.- Parameters:
f- theJInternalFramebeing viewed
-
deactivateFrame
This method is called when the frame is no longer selected. This action is delegated to the desktopManager.- Parameters:
f- theJInternalFramebeing viewed
-
createComponentListener
Creates a component listener.- Returns:
- a component listener
-
createGlassPaneDispatcher
Creates aGlassPaneDispatcher.- Returns:
- a
GlassPaneDispatcher
-