All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.JInternalFrame
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.swing.JComponent
|
+----java.awt.swing.JInternalFrame
- public class JInternalFrame
- extends JComponent
- implements Accessible
A lightweight object that provides many of the features of
a native frame, including dragging, closing, becoming an icon,
resizing, title display, and support for a menu bar. Generally,
you will create an instance and add it to a JDesktopPane.
The JInternalFrame has a 'contentPane' that is used to describe the
area of the component where normal child components should be placed.
So, if you wanted build a JInternalFrame that had a number of buttons
arranged through a BorderLayout object, you might do something like:
JComponent c = frame.getContentPane();
c.setLayoutManager(new BorderLayout());
c.add(new JButton(), "North");
c.add(new JButton(), "Center");
Please see the JRootPane documentation for a complete description of
the contentPane(), glassPane(), and layeredPane() components.
- See Also:
- JDesktopPane, JDesktopIcon, DesktopManager, JRootPane
closable-
CONTENT_PANE_PROPERTY- Bound property name.
desktopIcon-
frameIcon-
GLASS_PANE_PROPERTY- Bound property name.
iconable-
IS_CLOSED_PROPERTY- Constrained property name indicating that the frame is closed.
IS_ICON_PROPERTY- Constrained property name indicating that the frame is iconified.
IS_MAXIMUM_PROPERTY- Constrained property name indicating that the frame is maximized.
IS_SELECTED_PROPERTY- Constrained property name indicated that this frame has selected status.
isClosed-
isIcon-
isMaximum-
isSelected-
LAYERED_PANE_PROPERTY- Bound property name.
maximizable-
MENU_BAR_PROPERTY- Bound property name.
opaque-
resizable-
ROOT_PANE_PROPERTY- Bound property name.
rootPane-
title-
TITLE_PROPERTY- Bound property name.
JInternalFrame()
- Creates a JInternalFrame with no title, and all boolean setting false.
JInternalFrame(String)
- Creates a JInternalFrame with title, and all boolean setting false.
JInternalFrame(String, boolean)
-
JInternalFrame(String, boolean, boolean)
-
JInternalFrame(String, boolean, boolean, boolean)
-
JInternalFrame(String, boolean, boolean, boolean, boolean)
- Primative creation method that sets the appropriate values.
createRootPane()
-
getAccessibleName()
- Get the accessible name of this object.
getAccessibleRole()
- Get the role of this object.
getAccessibleValue()
- Get the value of this object as a Number.
getContentPane()
- The content pane is the child component of the JInternalFrame that normal
user components should be placed.
getDesktopIcon()
- Returns a JDesktopIcon object suitably configured to display this
JInternalFrame when iconified.
getDesktopPane()
- Convience method that searchs the anscestor heirarchy for a JDesktop
instance.
getFrameIcon()
-
getGlassPane()
-
getLayer()
- Convience method for getting the layer attribute of this component.
getLayeredPane()
-
getMenuBar()
-
getRootPane()
-
getTitle()
-
getUI()
-
getUIClassID()
-
isClosable()
- Can the JInternalFrame be closed by some user action.
isClosed()
-
isIcon()
-
isIconifiable()
-
isMaximizable()
-
isMaximum()
-
isOpaque()
- Returns true if this component is completely opaque.
isResizable()
-
isSelected()
-
moveToBack()
- Convience method that moves this component to position -1 if it's
parent is a JLayeredPane.
moveToFront()
- Convience method that moves this component to position 0 if it's
parent is a JLayeredPane.
setAccessibleValue(Number)
- Set the value of this object as a Number.
setClosable(boolean)
- Set that the JInternalFrame can be closed by some user action.
setClosed(boolean)
- Calling this method with true, will cause the frame to close.
setContentPane(Container)
-
setDesktopIcon(JDesktopIcon)
-
setFrameIcon(Icon)
- Sets an image to be displayed in the titlebar of the frame.
setGlassPane(Component)
-
setIcon(boolean)
- Setting this property to true will iconify the frame, false will
deiconify.
setIconifiable(boolean)
- Set that the JInternalFrame can be made an icon by some user action.
setLayer(Integer)
- Convience method for setting the layer attribute of this component.
setLayeredPane(JLayeredPane)
-
setMaximizable(boolean)
- Set that the JInternalFrame can be maximized by some user action.
setMaximum(boolean)
- Setting this property to true will maximize the frame,
false will minimize.
setMenuBar(JMenuBar)
-
setOpaque(boolean)
- Defines whether or not the frame's background should be painted.
setResizable(boolean)
- Set that the JInternalFrame resizable by some user action.
setRootPane(JRootPane)
-
setSelected(boolean)
- A JInternalFrame normally draws it's title bar differently if it is the
selected frame.
setTitle(String)
- Sets the JInternalFrame title.
setUI(InternalFrameUI)
-
startModal()
- Creates a new EventDispatchThread to dispatch events from.
stopModal()
- Stops the event dispatching loop created in a previous call to
start.
updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
rootPane
protected JRootPane rootPane
closable
protected boolean closable
isClosed
protected boolean isClosed
maximizable
protected boolean maximizable
isMaximum
protected boolean isMaximum
iconable
protected boolean iconable
isIcon
protected boolean isIcon
resizable
protected boolean resizable
isSelected
protected boolean isSelected
opaque
protected boolean opaque
frameIcon
protected Icon frameIcon
title
protected String title
desktopIcon
protected JDesktopIcon desktopIcon
CONTENT_PANE_PROPERTY
public static final String CONTENT_PANE_PROPERTY
- Bound property name.
MENU_BAR_PROPERTY
public static final String MENU_BAR_PROPERTY
- Bound property name.
TITLE_PROPERTY
public static final String TITLE_PROPERTY
- Bound property name.
LAYERED_PANE_PROPERTY
public static final String LAYERED_PANE_PROPERTY
- Bound property name.
ROOT_PANE_PROPERTY
public static final String ROOT_PANE_PROPERTY
- Bound property name.
GLASS_PANE_PROPERTY
public static final String GLASS_PANE_PROPERTY
- Bound property name.
IS_SELECTED_PROPERTY
public static final String IS_SELECTED_PROPERTY
- Constrained property name indicated that this frame has selected status.
IS_CLOSED_PROPERTY
public static final String IS_CLOSED_PROPERTY
- Constrained property name indicating that the frame is closed.
IS_MAXIMUM_PROPERTY
public static final String IS_MAXIMUM_PROPERTY
- Constrained property name indicating that the frame is maximized.
IS_ICON_PROPERTY
public static final String IS_ICON_PROPERTY
- Constrained property name indicating that the frame is iconified.
JInternalFrame
public JInternalFrame()
- Creates a JInternalFrame with no title, and all boolean setting false.
JInternalFrame
public JInternalFrame(String title)
- Creates a JInternalFrame with title, and all boolean setting false.
JInternalFrame
public JInternalFrame(String title,
boolean resizable)
JInternalFrame
public JInternalFrame(String title,
boolean resizable,
boolean closable)
JInternalFrame
public JInternalFrame(String title,
boolean resizable,
boolean closable,
boolean maximizable)
JInternalFrame
public JInternalFrame(String title,
boolean resizable,
boolean closable,
boolean maximizable,
boolean iconifiable)
- Primative creation method that sets the appropriate values.
createRootPane
protected JRootPane createRootPane()
getUI
public InternalFrameUI getUI()
setUI
public void setUI(InternalFrameUI ui)
updateUI
public void updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
- Overrides:
- updateUI in class JComponent
getUIClassID
public String getUIClassID()
- Returns:
- "InternalFrameUI"
- Overrides:
- getUIClassID in class JComponent
- See Also:
- getUIClassID, getUI
getContentPane
public Container getContentPane()
- The content pane is the child component of the JInternalFrame that normal
user components should be placed. If you want to add components to the
JInternalFrame, you should normally add them to this component, instead of
the JInternalFrame itself.
setContentPane
public void setContentPane(Container c)
getMenuBar
public JMenuBar getMenuBar()
setMenuBar
public void setMenuBar(JMenuBar m)
setLayeredPane
public void setLayeredPane(JLayeredPane layered)
getLayeredPane
public JLayeredPane getLayeredPane()
setGlassPane
public void setGlassPane(Component glass)
getGlassPane
public Component getGlassPane()
setRootPane
protected void setRootPane(JRootPane root)
getRootPane
public JRootPane getRootPane()
setClosable
public void setClosable(boolean b)
- Set that the JInternalFrame can be closed by some user action.
isClosable
public boolean isClosable()
- Can the JInternalFrame be closed by some user action.
isClosed
public boolean isClosed()
setClosed
public void setClosed(boolean b) throws PropertyVetoException
- Calling this method with true, will cause the frame to close.
- Throws:
PropertyVetoException
- when the attempt to set the property is vetoed
by the receiver.
setResizable
public void setResizable(boolean b)
- Set that the JInternalFrame resizable by some user action.
isResizable
public boolean isResizable()
setIconifiable
public void setIconifiable(boolean b)
- Set that the JInternalFrame can be made an icon by some user action.
isIconifiable
public boolean isIconifiable()
isIcon
public boolean isIcon()
setIcon
public void setIcon(boolean b) throws PropertyVetoException
- Setting this property to true will iconify the frame, false will
deiconify.
- Throws:
PropertyVetoException
- when the attempt to set the property is vetoed
by the receiver.
setMaximizable
public void setMaximizable(boolean b)
- Set that the JInternalFrame can be maximized by some user action.
isMaximizable
public boolean isMaximizable()
isMaximum
public boolean isMaximum()
setMaximum
public void setMaximum(boolean b) throws PropertyVetoException
- Setting this property to true will maximize the frame,
false will minimize.
- Throws:
PropertyVetoException
- when the attempt to set the property is vetoed
by the receiver.
getTitle
public String getTitle()
setTitle
public void setTitle(String title)
- Sets the JInternalFrame title.
setSelected
public void setSelected(boolean selected) throws PropertyVetoException
- A JInternalFrame normally draws it's title bar differently if it is the
selected frame. This normally indicates that this window has focus for the user.
- Throws:
PropertyVetoException
- when the attempt to set the property is vetoed
by the receiver.
isSelected
public boolean isSelected()
setFrameIcon
public void setFrameIcon(Icon icon)
- Sets an image to be displayed in the titlebar of the frame.
Do not confuse this with the desktopIcon object, which describes
what is displayed in the JDesktop when the frame is iconified.
getFrameIcon
public Icon getFrameIcon()
moveToFront
public void moveToFront()
- Convience method that moves this component to position 0 if it's
parent is a JLayeredPane.
moveToBack
public void moveToBack()
- Convience method that moves this component to position -1 if it's
parent is a JLayeredPane.
setLayer
public void setLayer(Integer layer)
- Convience method for setting the layer attribute of this component.
getLayer
public int getLayer()
- Convience method for getting the layer attribute of this component.
getDesktopPane
public JDesktopPane getDesktopPane()
- Convience method that searchs the anscestor heirarchy for a JDesktop
instance. If JInternalFrame finds none, the desktopIcon tree is searched.
setDesktopIcon
public void setDesktopIcon(JDesktopIcon d)
getDesktopIcon
public JDesktopIcon getDesktopIcon()
- Returns a JDesktopIcon object suitably configured to display this
JInternalFrame when iconified.
isOpaque
public boolean isOpaque()
- Returns true if this component is completely opaque.
- Overrides:
- isOpaque in class JComponent
setOpaque
public void setOpaque(boolean opaque)
- Defines whether or not the frame's background should be painted.
Setting this to false results in the frame being transparent.
Set to true by default.
- Parameters:
- opaque - whether or not the background should be painted
- See Also:
- isOpaque
startModal
public void startModal()
- Creates a new EventDispatchThread to dispatch events from. This
method will return when stopModal is invoked.
stopModal
public void stopModal()
- Stops the event dispatching loop created in a previous call to
start.
getAccessibleName
public String getAccessibleName()
- Get the accessible name of this object. This should almost never
return java.awt.Component.getName(), as that generally isn't
a localized name, and doesn't have meaning for the user. If the
object is fundamentally a text object (e.g. a menu item), the
accessible name should be the text of the object (e.g. "save").
If the object has a tooltip, the tooltip text may also be an
appropriate String to return.
- Returns:
- the localized name of the object -- can be null if this
object does not have a name
- Overrides:
- getAccessibleName in class JComponent
- See Also:
- setAccessibleName
getAccessibleRole
public AccessibleRole getAccessibleRole()
- Get the role of this object.
- Returns:
- an instance of AccessibleRole describing the role of the object
- Overrides:
- getAccessibleRole in class JComponent
- See Also:
- AccessibleRole
getAccessibleValue
public Number getAccessibleValue()
- Get the value of this object as a Number.
- Returns:
- value of the object -- can be null if this object does not
have a value
- Overrides:
- getAccessibleValue in class JComponent
setAccessibleValue
public boolean setAccessibleValue(Number n)
- Set the value of this object as a Number.
- Returns:
- True if the value was set.
- Overrides:
- setAccessibleValue in class JComponent
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature