|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.InternalFrameUI javax.swing.plaf.basic.BasicInternalFrameUI
A basic L&F implementation of JInternalFrame.
Nested Class Summary | |
protected class |
BasicInternalFrameUI.BasicInternalFrameListener
|
protected class |
BasicInternalFrameUI.BorderListener
Listens for border adjustments. |
protected class |
BasicInternalFrameUI.ComponentHandler
|
protected class |
BasicInternalFrameUI.GlassPaneDispatcher
|
class |
BasicInternalFrameUI.InternalFrameLayout
|
class |
BasicInternalFrameUI.InternalFramePropertyChangeListener
|
Field Summary | |
protected MouseInputAdapter |
borderListener
|
protected ComponentListener |
componentListener
|
protected JComponent |
eastPane
|
protected JInternalFrame |
frame
|
protected MouseInputListener |
glassPaneDispatcher
|
protected LayoutManager |
internalFrameLayout
|
protected JComponent |
northPane
|
protected KeyStroke |
openMenuKey
Deprecated. As of Java 2 platform v1.3. |
protected PropertyChangeListener |
propertyChangeListener
|
protected JComponent |
southPane
|
protected BasicInternalFrameTitlePane |
titlePane
|
protected JComponent |
westPane
|
Constructor Summary | |
BasicInternalFrameUI(JInternalFrame b)
|
Method Summary | |
protected void |
activateFrame(JInternalFrame f)
This method is called when the frame becomes selected. |
protected void |
closeFrame(JInternalFrame f)
This method is called when the user wants to close the frame. |
protected MouseInputAdapter |
createBorderListener(JInternalFrame w)
|
protected ComponentListener |
createComponentListener()
|
protected DesktopManager |
createDesktopManager()
|
protected JComponent |
createEastPane(JInternalFrame w)
|
protected MouseInputListener |
createGlassPaneDispatcher()
|
protected void |
createInternalFrameListener()
|
protected LayoutManager |
createLayoutManager()
|
protected JComponent |
createNorthPane(JInternalFrame w)
|
protected PropertyChangeListener |
createPropertyChangeListener()
|
protected JComponent |
createSouthPane(JInternalFrame w)
|
static ComponentUI |
createUI(JComponent b)
Returns an instance of the UI delegate for the specified component. |
protected JComponent |
createWestPane(JInternalFrame w)
|
protected void |
deactivateFrame(JInternalFrame f)
This method is called when the frame is no longer selected. |
protected void |
deiconifyFrame(JInternalFrame f)
This method is called when the user wants to deiconify the frame. |
protected void |
deinstallMouseHandlers(JComponent c)
|
protected DesktopManager |
getDesktopManager()
Returns the proper DesktopManager. |
JComponent |
getEastPane()
|
Dimension |
getMaximumSize(JComponent x)
Returns the specified component's maximum size appropriate for the look and feel. |
Dimension |
getMinimumSize(JComponent x)
Returns the specified component's minimum size appropriate for the look and feel. |
JComponent |
getNorthPane()
|
Dimension |
getPreferredSize(JComponent x)
Returns the specified component's preferred size appropriate for the look and feel. |
JComponent |
getSouthPane()
|
JComponent |
getWestPane()
|
protected void |
iconifyFrame(JInternalFrame f)
This method is called when the user wants to iconify the frame. |
protected void |
installComponents()
|
protected void |
installDefaults()
|
protected void |
installKeyboardActions()
|
protected void |
installListeners()
|
protected void |
installMouseHandlers(JComponent c)
|
void |
installUI(JComponent c)
Configures the specified component appropriate for the look and feel. |
boolean |
isKeyBindingActive()
|
protected boolean |
isKeyBindingRegistered()
|
protected void |
maximizeFrame(JInternalFrame f)
This method is called when the user wants to maximize the frame. |
protected void |
minimizeFrame(JInternalFrame f)
This method is called when the user wants to minimize the frame. |
protected void |
replacePane(JComponent currentPane,
JComponent newPane)
Installs necessary mouse handlers on newPane
and adds it to the frame. |
void |
setEastPane(JComponent c)
|
protected void |
setKeyBindingActive(boolean b)
|
protected void |
setKeyBindingRegistered(boolean b)
|
void |
setNorthPane(JComponent c)
|
void |
setSouthPane(JComponent c)
|
protected void |
setupMenuCloseKey()
|
protected void |
setupMenuOpenKey()
|
void |
setWestPane(JComponent c)
|
protected void |
uninstallComponents()
|
protected void |
uninstallDefaults()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(JComponent c)
Reverses configuration which was done on the specified component during installUI . |
Methods inherited from class javax.swing.plaf.ComponentUI |
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JInternalFrame frame
protected MouseInputAdapter borderListener
protected PropertyChangeListener propertyChangeListener
protected LayoutManager internalFrameLayout
protected ComponentListener componentListener
protected MouseInputListener glassPaneDispatcher
protected JComponent northPane
protected JComponent southPane
protected JComponent westPane
protected JComponent eastPane
protected BasicInternalFrameTitlePane titlePane
protected KeyStroke openMenuKey
Constructor Detail |
public BasicInternalFrameUI(JInternalFrame b)
Method Detail |
public static ComponentUI createUI(JComponent b)
ComponentUI
createUI
method that returns an instance of that UI delegate subclass.
If the UI delegate subclass is stateless, it may return an instance
that is shared by multiple components. If the UI delegate is
stateful, then it should return a new instance per component.
The default implementation of this method throws an error, as it
should never be invoked.
public void installUI(JComponent c)
ComponentUI
ComponentUI
instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
installUI
in class ComponentUI
c
- the component where this UI delegate is being installedComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
installUI
. This method is invoked when this
UIComponent
instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI
, being careful to
leave the JComponent
instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
uninstallUI
in class ComponentUI
c
- the component from which this UI delegate is being removed;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installDefaults()
protected void installKeyboardActions()
protected void installComponents()
protected void installListeners()
protected void uninstallDefaults()
protected void uninstallComponents()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
protected LayoutManager createLayoutManager()
protected PropertyChangeListener createPropertyChangeListener()
public Dimension getPreferredSize(JComponent x)
ComponentUI
null
is returned, the preferred
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method returns null
.
getPreferredSize
in class ComponentUI
x
- the component whose preferred size is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsJComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent x)
ComponentUI
null
is returned, the minimum
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method invokes getPreferredSize
and returns that value.
getMinimumSize
in class ComponentUI
x
- the component whose minimum size is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components
Dimension
object or null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent x)
ComponentUI
null
is returned, the maximum
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method invokes getPreferredSize
and returns that value.
getMaximumSize
in class ComponentUI
x
- the component whose maximum size is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components
Dimension
object or null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void replacePane(JComponent currentPane, JComponent newPane)
newPane
and adds it to the frame.
Reverse process for the currentPane
.
protected void deinstallMouseHandlers(JComponent c)
protected void installMouseHandlers(JComponent c)
protected JComponent createNorthPane(JInternalFrame w)
protected JComponent createSouthPane(JInternalFrame w)
protected JComponent createWestPane(JInternalFrame w)
protected JComponent createEastPane(JInternalFrame w)
protected MouseInputAdapter createBorderListener(JInternalFrame w)
protected void createInternalFrameListener()
protected final boolean isKeyBindingRegistered()
protected final void setKeyBindingRegistered(boolean b)
public final boolean isKeyBindingActive()
protected final void setKeyBindingActive(boolean b)
protected void setupMenuOpenKey()
protected void setupMenuCloseKey()
public JComponent getNorthPane()
public void setNorthPane(JComponent c)
public JComponent getSouthPane()
public void setSouthPane(JComponent c)
public JComponent getWestPane()
public void setWestPane(JComponent c)
public JComponent getEastPane()
public void setEastPane(JComponent c)
protected DesktopManager getDesktopManager()
protected DesktopManager createDesktopManager()
protected void closeFrame(JInternalFrame f)
playCloseSound
Action is fired.
This action is delegated to the desktopManager.
protected void maximizeFrame(JInternalFrame f)
playMaximizeSound
Action is fired.
This action is delegated to the desktopManager.
protected void minimizeFrame(JInternalFrame f)
playRestoreDownSound
Action is fired.
This action is delegated to the desktopManager.
protected void iconifyFrame(JInternalFrame f)
playMinimizeSound
Action is fired.
This action is delegated to the desktopManager.
protected void deiconifyFrame(JInternalFrame f)
playRestoreUpSound
Action is fired.
This action is delegated to the desktopManager.
protected void activateFrame(JInternalFrame f)
protected void deactivateFrame(JInternalFrame f)
protected ComponentListener createComponentListener()
protected MouseInputListener createGlassPaneDispatcher()
|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2003, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.