javax.swing.plaf.basic

Class BasicInternalFrameUI

public class BasicInternalFrameUI extends InternalFrameUI

This is the UI delegate for the Basic look and feel for JInternalFrames.
Nested Class Summary
protected classBasicInternalFrameUI.BasicInternalFrameListener
This is a helper class that listens to the JInternalFrame for InternalFrameEvents.
protected classBasicInternalFrameUI.BorderListener
This helper class listens to the edges of the JInternalFrame and the TitlePane for mouse events.
protected classBasicInternalFrameUI.ComponentHandler
This helper class listens to the JDesktopPane that parents this JInternalFrame and listens for resize events and resizes the JInternalFrame appropriately.
protected classBasicInternalFrameUI.GlassPaneDispatcher
This helper class is used to listen to the JDesktopPane's glassPane for MouseEvents.
classBasicInternalFrameUI.InternalFrameLayout
This helper class acts as the LayoutManager for JInternalFrames.
classBasicInternalFrameUI.InternalFramePropertyChangeListener
This helper class listens for PropertyChangeEvents from the JInternalFrame.
Field Summary
protected MouseInputAdapterborderListener
The MouseListener that is responsible for dragging and resizing the JInternalFrame in response to MouseEvents.
protected ComponentListenercomponentListener
The ComponentListener that is responsible for resizing the JInternalFrame in response to ComponentEvents from the JDesktopPane.
protected JComponenteastPane
The JComponent placed at the east region of the JInternalFrame.
protected JInternalFrameframe
The JInternalFrame this UI is responsible for.
protected MouseInputListenerglassPaneDispatcher
The MouseListener that is responsible for activating the JInternalFrame when the mouse press activates one of its descendents.
protected LayoutManagerinternalFrameLayout
The LayoutManager used in the JInternalFrame.
protected JComponentnorthPane
The JComponent placed at the north region of the JInternalFrame.
protected KeyStrokeopenMenuKey
The Keystroke bound to open the menu.
protected PropertyChangeListenerpropertyChangeListener
The PropertyChangeListener that is responsible for listening to PropertyChangeEvents from the JInternalFrame.
protected JComponentsouthPane
The JComponent placed at the south region of the JInternalFrame.
protected BasicInternalFrameTitlePanetitlePane
The TitlePane displayed at the top of the JInternalFrame.
protected JComponentwestPane
The JComponent placed at the west region of the JInternalFrame.
Constructor Summary
BasicInternalFrameUI(JInternalFrame b)
Creates a new BasicInternalFrameUI object.
Method Summary
protected voidactivateFrame(JInternalFrame f)
This is a convenience method that activates the JInternalFrame.
protected voidcloseFrame(JInternalFrame f)
This is a convenience method that closes the JInternalFrame.
protected MouseInputAdaptercreateBorderListener(JInternalFrame w)
This method returns a new BorderListener for the given JInternalFrame.
protected ComponentListenercreateComponentListener()
This method returns a new ComponentListener for the JDesktopPane.
protected DesktopManagercreateDesktopManager()
This method returns a default DesktopManager that can be used with this JInternalFrame.
protected JComponentcreateEastPane(JInternalFrame w)
This method creates the east pane used in the JInternalFrame.
protected MouseInputListenercreateGlassPaneDispatcher()
This method returns a new GlassPaneDispatcher.
protected voidcreateInternalFrameListener()
This method creates a new InternalFrameListener for the JInternalFrame.
protected LayoutManagercreateLayoutManager()
This method creates a new LayoutManager for the JInternalFrame.
protected JComponentcreateNorthPane(JInternalFrame w)
This method creates the north pane used in the JInternalFrame.
protected PropertyChangeListenercreatePropertyChangeListener()
This method creates a new PropertyChangeListener for the JInternalFrame.
protected JComponentcreateSouthPane(JInternalFrame w)
This method creates the south pane used in the JInternalFrame.
static ComponentUIcreateUI(JComponent b)
This method will create a new BasicInternalFrameUI for the given JComponent.
protected JComponentcreateWestPane(JInternalFrame w)
This method creates the west pane used in the JInternalFrame.
protected voiddeactivateFrame(JInternalFrame f)
This is a convenience method that deactivates the JInternalFrame.
protected voiddeiconifyFrame(JInternalFrame f)
This is a convenience method that deiconifies the JInternalFrame.
protected voiddeinstallMouseHandlers(JComponent c)
This method removes the necessary MouseListeners from the given JComponent.
protected DesktopManagergetDesktopManager()
This method returns the DesktopManager to use with the JInternalFrame.
JComponentgetEastPane()
This method returns the east pane.
DimensiongetMaximumSize(JComponent x)
This method returns the maximum size of the given JComponent.
DimensiongetMinimumSize(JComponent x)
This method returns the minimum size of the given JComponent.
JComponentgetNorthPane()
This method returns the north pane.
DimensiongetPreferredSize(JComponent x)
This method returns the preferred size of the given JComponent.
JComponentgetSouthPane()
This method returns the south pane.
JComponentgetWestPane()
This method returns the west pane.
protected voidiconifyFrame(JInternalFrame f)
This is a convenience method that iconifies the JInternalFrame.
protected voidinstallComponents()
This method installs the Components for the JInternalFrame.
protected voidinstallDefaults()
This method installs the defaults specified by the look and feel.
protected voidinstallKeyboardActions()
This method installs the keyboard actions for the JInternalFrame.
protected voidinstallListeners()
This method installs the listeners for the JInternalFrame.
protected voidinstallMouseHandlers(JComponent c)
This method installs the necessary MouseListeners from the given JComponent.
voidinstallUI(JComponent c)
This method installs a UI for the JInternalFrame.
booleanisKeyBindingActive()
DOCUMENT ME!
protected booleanisKeyBindingRegistered()
DOCUMENT ME!
protected voidmaximizeFrame(JInternalFrame f)
This is a convenience method that maximizes the JInternalFrame.
protected voidminimizeFrame(JInternalFrame f)
This is a convenience method that minimizes the JInternalFrame.
protected voidreplacePane(JComponent currentPane, JComponent newPane)
This method replaces the currentPane with the newPane.
voidsetEastPane(JComponent c)
This method sets the east pane to be the given JComponent.
protected voidsetKeyBindingActive(boolean b)
DOCUMENT ME!
protected voidsetKeyBindingRegistered(boolean b)
DOCUMENT ME!
voidsetNorthPane(JComponent c)
This method sets the north pane to be the given JComponent.
voidsetSouthPane(JComponent c)
This method sets the south pane to be the given JComponent.
protected voidsetupMenuCloseKey()
DOCUMENT ME!
protected voidsetupMenuOpenKey()
DOCUMENT ME!
voidsetWestPane(JComponent c)
This method sets the west pane to be the given JComponent.
protected voiduninstallComponents()
This method uninstalls the Components for the JInternalFrame.
protected voiduninstallDefaults()
This method uninstalls the defaults for the JInternalFrame.
protected voiduninstallKeyboardActions()
This method uninstalls the keyboard actions for the JInternalFrame.
protected voiduninstallListeners()
This method uninstalls the listeners for the JInternalFrame.
voiduninstallUI(JComponent c)
This method reverses the work done by installUI.

Field Detail

borderListener

protected MouseInputAdapter borderListener
The MouseListener that is responsible for dragging and resizing the JInternalFrame in response to MouseEvents.

componentListener

protected ComponentListener componentListener
The ComponentListener that is responsible for resizing the JInternalFrame in response to ComponentEvents from the JDesktopPane.

eastPane

protected JComponent eastPane
The JComponent placed at the east region of the JInternalFrame.

frame

protected JInternalFrame frame
The JInternalFrame this UI is responsible for.

glassPaneDispatcher

protected MouseInputListener glassPaneDispatcher
The MouseListener that is responsible for activating the JInternalFrame when the mouse press activates one of its descendents.

internalFrameLayout

protected LayoutManager internalFrameLayout
The LayoutManager used in the JInternalFrame.

northPane

protected JComponent northPane
The JComponent placed at the north region of the JInternalFrame.

openMenuKey

protected KeyStroke openMenuKey

Deprecated:

The Keystroke bound to open the menu.

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
The PropertyChangeListener that is responsible for listening to PropertyChangeEvents from the JInternalFrame.

southPane

protected JComponent southPane
The JComponent placed at the south region of the JInternalFrame.

titlePane

protected BasicInternalFrameTitlePane titlePane
The TitlePane displayed at the top of the JInternalFrame.

westPane

protected JComponent westPane
The JComponent placed at the west region of the JInternalFrame.

Constructor Detail

BasicInternalFrameUI

public BasicInternalFrameUI(JInternalFrame b)
Creates a new BasicInternalFrameUI object.

Parameters: b The JInternalFrame this UI will represent.

Method Detail

activateFrame

protected void activateFrame(JInternalFrame f)
This is a convenience method that activates the JInternalFrame.

Parameters: f The JInternalFrame to activate.

closeFrame

protected void closeFrame(JInternalFrame f)
This is a convenience method that closes the JInternalFrame.

Parameters: f The JInternalFrame to close.

createBorderListener

protected MouseInputAdapter createBorderListener(JInternalFrame w)
This method returns a new BorderListener for the given JInternalFrame.

Parameters: w The JIntenalFrame to create a BorderListener for.

Returns: A new BorderListener.

createComponentListener

protected ComponentListener createComponentListener()
This method returns a new ComponentListener for the JDesktopPane.

Returns: A new ComponentListener.

createDesktopManager

protected DesktopManager createDesktopManager()
This method returns a default DesktopManager that can be used with this JInternalFrame.

Returns: A default DesktopManager that can be used with this JInternalFrame.

createEastPane

protected JComponent createEastPane(JInternalFrame w)
This method creates the east pane used in the JInternalFrame.

Parameters: w The JInternalFrame to create an east pane for.

Returns: The east pane.

createGlassPaneDispatcher

protected MouseInputListener createGlassPaneDispatcher()
This method returns a new GlassPaneDispatcher.

Returns: A new GlassPaneDispatcher.

createInternalFrameListener

protected void createInternalFrameListener()
This method creates a new InternalFrameListener for the JInternalFrame.

createLayoutManager

protected LayoutManager createLayoutManager()
This method creates a new LayoutManager for the JInternalFrame.

Returns: A new LayoutManager for the JInternalFrame.

createNorthPane

protected JComponent createNorthPane(JInternalFrame w)
This method creates the north pane used in the JInternalFrame.

Parameters: w The JInternalFrame to create a north pane for.

Returns: The north pane.

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
This method creates a new PropertyChangeListener for the JInternalFrame.

Returns: A new PropertyChangeListener for the JInternalFrame.

createSouthPane

protected JComponent createSouthPane(JInternalFrame w)
This method creates the south pane used in the JInternalFrame.

Parameters: w The JInternalFrame to create a south pane for.

Returns: The south pane.

createUI

public static ComponentUI createUI(JComponent b)
This method will create a new BasicInternalFrameUI for the given JComponent.

Parameters: b The JComponent to create a BasicInternalFrameUI for.

Returns: A new BasicInternalFrameUI.

createWestPane

protected JComponent createWestPane(JInternalFrame w)
This method creates the west pane used in the JInternalFrame.

Parameters: w The JInternalFrame to create a west pane for.

Returns: The west pane.

deactivateFrame

protected void deactivateFrame(JInternalFrame f)
This is a convenience method that deactivates the JInternalFrame.

Parameters: f the JInternalFrame to deactivate

deiconifyFrame

protected void deiconifyFrame(JInternalFrame f)
This is a convenience method that deiconifies the JInternalFrame.

Parameters: f The JInternalFrame to deiconify.

deinstallMouseHandlers

protected void deinstallMouseHandlers(JComponent c)
This method removes the necessary MouseListeners from the given JComponent.

Parameters: c The JComponent to remove MouseListeners from.

getDesktopManager

protected DesktopManager getDesktopManager()
This method returns the DesktopManager to use with the JInternalFrame.

Returns: The DesktopManager to use with the JInternalFrame.

getEastPane

public JComponent getEastPane()
This method returns the east pane.

Returns: The east pane.

getMaximumSize

public Dimension getMaximumSize(JComponent x)
This method returns the maximum size of the given JComponent.

Parameters: x The JComponent to find a maximum size for.

Returns: The maximum size.

getMinimumSize

public Dimension getMinimumSize(JComponent x)
This method returns the minimum size of the given JComponent.

Parameters: x The JComponent to find a minimum size for.

Returns: The minimum size.

getNorthPane

public JComponent getNorthPane()
This method returns the north pane.

Returns: The north pane.

getPreferredSize

public Dimension getPreferredSize(JComponent x)
This method returns the preferred size of the given JComponent.

Parameters: x The JComponent to find a preferred size for.

Returns: The preferred size.

getSouthPane

public JComponent getSouthPane()
This method returns the south pane.

Returns: The south pane.

getWestPane

public JComponent getWestPane()
This method returns the west pane.

Returns: The west pane.

iconifyFrame

protected void iconifyFrame(JInternalFrame f)
This is a convenience method that iconifies the JInternalFrame.

Parameters: f The JInternalFrame to iconify.

installComponents

protected void installComponents()
This method installs the Components for the JInternalFrame.

installDefaults

protected void installDefaults()
This method installs the defaults specified by the look and feel.

installKeyboardActions

protected void installKeyboardActions()
This method installs the keyboard actions for the JInternalFrame.

installListeners

protected void installListeners()
This method installs the listeners for the JInternalFrame.

installMouseHandlers

protected void installMouseHandlers(JComponent c)
This method installs the necessary MouseListeners from the given JComponent.

Parameters: c The JComponent to install MouseListeners on.

installUI

public void installUI(JComponent c)
This method installs a UI for the JInternalFrame.

Parameters: c The JComponent to install this UI on.

isKeyBindingActive

public final boolean isKeyBindingActive()
DOCUMENT ME!

Returns: DOCUMENT ME!

isKeyBindingRegistered

protected final boolean isKeyBindingRegistered()
DOCUMENT ME!

Returns: DOCUMENT ME!

maximizeFrame

protected void maximizeFrame(JInternalFrame f)
This is a convenience method that maximizes the JInternalFrame.

Parameters: f The JInternalFrame to maximize.

minimizeFrame

protected void minimizeFrame(JInternalFrame f)
This is a convenience method that minimizes the JInternalFrame.

Parameters: f The JInternalFrame to minimize.

replacePane

protected void replacePane(JComponent currentPane, JComponent newPane)
This method replaces the currentPane with the newPane. When replacing it also removes the MouseHandlers for the old pane and installs them on the new pane.

Parameters: currentPane The old pane to remove. newPane The new pane to install.

setEastPane

public void setEastPane(JComponent c)
This method sets the east pane to be the given JComponent.

Parameters: c The new east pane.

setKeyBindingActive

protected final void setKeyBindingActive(boolean b)
DOCUMENT ME!

Parameters: b DOCUMENT ME!

setKeyBindingRegistered

protected final void setKeyBindingRegistered(boolean b)
DOCUMENT ME!

Parameters: b DOCUMENT ME!

setNorthPane

public void setNorthPane(JComponent c)
This method sets the north pane to be the given JComponent.

Parameters: c The new north pane.

setSouthPane

public void setSouthPane(JComponent c)
This method sets the south pane to be the given JComponent.

Parameters: c The new south pane.

setupMenuCloseKey

protected void setupMenuCloseKey()
DOCUMENT ME!

setupMenuOpenKey

protected void setupMenuOpenKey()
DOCUMENT ME!

setWestPane

public void setWestPane(JComponent c)
This method sets the west pane to be the given JComponent.

Parameters: c The new west pane.

uninstallComponents

protected void uninstallComponents()
This method uninstalls the Components for the JInternalFrame.

uninstallDefaults

protected void uninstallDefaults()
This method uninstalls the defaults for the JInternalFrame.

uninstallKeyboardActions

protected void uninstallKeyboardActions()
This method uninstalls the keyboard actions for the JInternalFrame.

uninstallListeners

protected void uninstallListeners()
This method uninstalls the listeners for the JInternalFrame.

uninstallUI

public void uninstallUI(JComponent c)
This method reverses the work done by installUI.

Parameters: c The JComponent to uninstall this UI for.