All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JInternalFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JInternalFrame

public class JInternalFrame
extends JComponent
A lightwieght component that represents a normal native Frame type object. An JInternalFrame can have a title bar (displaying a text string) by which a user can drag the JInternalFrame around the screen; a close button that the user can click to make a JInternalFrame invisible (remove it from the View hierarchy); and a resize bar, allowing a user to resize the JInternalFrame and its contents.

An JInternalFrame has a "centerView," which is the ancestor of all components added to JInternalFrame programmatically. Calling JInternalFrame's addSubvew() adds the component to the JInternalFrame's centerView rather than directly to the JInternalFrame.

The JInternalFrame manages five views in a manner very similar to BorderLayout. There is a north, south, east, west and center views that can be set. These views can be used to manage the titlebar, resize bar, etc of the JInternalFrame.


Variable Index

 o border
 o CENTER_VIEW_PROPERTY
Bound property name.
 o centerView
 o closable
 o EAST_VIEW_PROPERTY
Bound property name.
 o eastView
 o frameIcon
 o iconable
 o iconifiedBounds
 o IS_CLOSED_PROPERTY
Constrained property name.
 o IS_ICON_PROPERTY
Constrained property name.
 o IS_MAIN_PROPERTY
Constrained property name.
 o IS_MAX_PROPERTY
Constrained property name.
 o isClosed
 o isIcon
 o isMain
 o isMaxed
 o maxable
 o MENU_BAR_PROPERTY
Bound property name.
 o menuBar
 o NORTH_VIEW_PROPERTY
Bound property name.
 o northView
 o paintBackground
 o previousBounds
 o resizable
 o SOUTH_VIEW_PROPERTY
Bound property name.
 o southView
 o title
 o TITLE_PROPERTY
Bound property name.
 o WEST_VIEW_PROPERTY
Bound property name.
 o westView

Constructor Index

 o JInternalFrame()
Creates a JInternalFrame with no title, and all boolean setting false.
 o JInternalFrame(String)
 o JInternalFrame(String, boolean)
 o JInternalFrame(String, boolean, boolean)
 o JInternalFrame(String, boolean, boolean, boolean, boolean)

Method Index

 o add(Component)
Redirected this call to the centerView.
 o add(Component, int)
Redirected this call to the centerView.
 o add(Component, Object)
Redirected this call to the centerView.
 o add(Component, Object, int)
Redirected this call to the centerView.
 o add(String, Component)
Redirected this call to the centerView.
 o addToFrame(JComponent)
This method will add a component to the actual JInternalFrame.
 o addToFrame(JComponent, Object, int)
This method will add a component to the actual JInternalFrame.
 o center()
 o frameSizeForContentSize(int, int)
 o getBorder()
 o getCenterView()
 o getEastView()
 o getFrameIcon()
 o getIconifiedBounds()
 o getLayer()
 o getMenuBar()
 o getNorthView()
 o getPreviousBounds()
 o getSouthView()
 o getTitle()
 o getUI()
 o getWestView()
 o isBackgroundPainted()
 o isClosable()
 o isClosed()
 o isIcon()
 o isIconable()
 o isMain()
 o isMaxable()
 o isMaxed()
 o isOpaque()
 o isResizable()
 o moveToBack()
Convience method that moves this component to position -1 if it's parent is a JLayeredPane.
 o moveToFront()
Convience method that moves this component to position 0 if it's parent is a JLayeredPane.
 o remove(Component)
Redirected this call to the centerView.
 o remove(int)
Redirected this call to the centerView.
 o removeAll()
Redirected this call to the centerView.
 o removeAllFromFrame()
This method will remove all components from the actual JInternalFrame.
 o removeFromFrame(Component)
This method will remove a component from the actual JInternalFrame.
 o removeFromFrame(int)
This method will remove a component from the actual JInternalFrame.
 o setBackgroundPainted(boolean)
 o setBorder(Border)
 o setBounds(int, int, int, int)
This method is overriden to call validate if there was a change in bounds.
 o setCenterView(JComponent)
 o setClosable(boolean)
Set that the JInternalFrame can be closed by some user action.
 o setClosed(boolean)
 o setEastView(JComponent)
 o setFrameIcon(Icon)
 o setIcon(boolean)
 o setIconable(boolean)
Set that the JInternalFrame can be made an icon by some user action.
 o setIconifiedBounds(Rectangle)
 o setLayer(int)
Convience method for setting the layer attribute of this component.
 o setLayout(LayoutManager)
Overridden to set the LayoutManager on the centerView of this JInternalFrame.
 o setLayoutOfFrame(LayoutManager)
Sets the LayoutManager of the actual JInternalFrame.
 o setMain(boolean)
A JInternalFrame normally draws it's title bar differently if it is the main window.
 o setMaxable(boolean)
Set that the JInternalFrame can be maximized by some user action.
 o setMaxed(boolean)
 o setMenuBar(JMenuBar)
 o setNorthView(JComponent)
 o setPreviousBounds(Rectangle)
 o setResizable(boolean)
Set that the JInternalFrame resizable by some user action.
 o setSouthView(JComponent)
 o setTitle(String)
Sets the JInternalFrame title.
 o setUI(InternalFrameUI)
 o setWestView(JComponent)
 o updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Variables

 o centerView
 protected JComponent centerView
 o northView
 protected JComponent northView
 o southView
 protected JComponent southView
 o westView
 protected JComponent westView
 o eastView
 protected JComponent eastView
 o menuBar
 protected JMenuBar menuBar
 o closable
 protected boolean closable
 o isClosed
 protected boolean isClosed
 o maxable
 protected boolean maxable
 o isMaxed
 protected boolean isMaxed
 o iconable
 protected boolean iconable
 o isIcon
 protected boolean isIcon
 o resizable
 protected boolean resizable
 o title
 protected String title
 o isMain
 protected boolean isMain
 o frameIcon
 protected Icon frameIcon
 o previousBounds
 protected Rectangle previousBounds
 o iconifiedBounds
 protected Rectangle iconifiedBounds
 o border
 protected Border border
 o paintBackground
 protected boolean paintBackground
 o NORTH_VIEW_PROPERTY
 public static final String NORTH_VIEW_PROPERTY
Bound property name.

 o SOUTH_VIEW_PROPERTY
 public static final String SOUTH_VIEW_PROPERTY
Bound property name.

 o WEST_VIEW_PROPERTY
 public static final String WEST_VIEW_PROPERTY
Bound property name.

 o EAST_VIEW_PROPERTY
 public static final String EAST_VIEW_PROPERTY
Bound property name.

 o CENTER_VIEW_PROPERTY
 public static final String CENTER_VIEW_PROPERTY
Bound property name.

 o MENU_BAR_PROPERTY
 public static final String MENU_BAR_PROPERTY
Bound property name.

 o TITLE_PROPERTY
 public static final String TITLE_PROPERTY
Bound property name.

 o IS_MAIN_PROPERTY
 public static final String IS_MAIN_PROPERTY
Constrained property name.

 o IS_CLOSED_PROPERTY
 public static final String IS_CLOSED_PROPERTY
Constrained property name. Write-Only property.

 o IS_MAX_PROPERTY
 public static final String IS_MAX_PROPERTY
Constrained property name. Opposite of mimimize.

 o IS_ICON_PROPERTY
 public static final String IS_ICON_PROPERTY
Constrained property name.

Constructors

 o JInternalFrame
 public JInternalFrame()
Creates a JInternalFrame with no title, and all boolean setting false.

 o JInternalFrame
 public JInternalFrame(String title)
 o JInternalFrame
 public JInternalFrame(String title,
                       boolean resizable)
 o JInternalFrame
 public JInternalFrame(String title,
                       boolean resizable,
                       boolean closable)
 o JInternalFrame
 public JInternalFrame(String title,
                       boolean resizable,
                       boolean closable,
                       boolean maxable,
                       boolean iconable)

Methods

 o getUI
 public InternalFrameUI getUI()
 o setUI
 public void setUI(InternalFrameUI ui)
 o updateUI
 public void updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Overrides:
updateUI in class JComponent
 o setBounds
 public void setBounds(int x,
                       int y,
                       int width,
                       int height)
This method is overriden to call validate if there was a change in bounds.

Overrides:
setBounds in class JComponent
 o setLayout
 public void setLayout(LayoutManager m)
Overridden to set the LayoutManager on the centerView of this JInternalFrame.

Overrides:
setLayout in class Container
 o setLayoutOfFrame
 public void setLayoutOfFrame(LayoutManager m)
Sets the LayoutManager of the actual JInternalFrame.

 o add
 public Component add(Component comp)
Redirected this call to the centerView.

Overrides:
add in class Container
 o add
 public Component add(Component comp,
                      int index)
Redirected this call to the centerView.

Overrides:
add in class Container
 o add
 public void add(Component comp,
                 Object constraints)
Redirected this call to the centerView.

Overrides:
add in class Container
 o add
 public void add(Component comp,
                 Object constraints,
                 int index)
Redirected this call to the centerView.

Overrides:
add in class Container
 o add
 public Component add(String name,
                      Component comp)
Redirected this call to the centerView.

Overrides:
add in class Container
 o remove
 public void remove(int index)
Redirected this call to the centerView.

Overrides:
remove in class Container
 o remove
 public void remove(Component comp)
Redirected this call to the centerView.

Overrides:
remove in class Container
 o removeAll
 public void removeAll()
Redirected this call to the centerView.

Overrides:
removeAll in class Container
 o addToFrame
 public void addToFrame(JComponent c)
This method will add a component to the actual JInternalFrame. Normally you should call one of the set[Direction]View() methods instead of this method.

 o addToFrame
 public void addToFrame(JComponent c,
                        Object constraints,
                        int index)
This method will add a component to the actual JInternalFrame.

 o removeFromFrame
 public void removeFromFrame(int index)
This method will remove a component from the actual JInternalFrame.

 o removeFromFrame
 public void removeFromFrame(Component comp)
This method will remove a component from the actual JInternalFrame.

 o removeAllFromFrame
 public void removeAllFromFrame()
This method will remove all components from the actual JInternalFrame.

 o getCenterView
 public JComponent getCenterView()
 o setCenterView
 public void setCenterView(JComponent c)
 o getNorthView
 public JComponent getNorthView()
 o setNorthView
 public void setNorthView(JComponent c)
 o getSouthView
 public JComponent getSouthView()
 o setSouthView
 public void setSouthView(JComponent c)
 o getWestView
 public JComponent getWestView()
 o setWestView
 public void setWestView(JComponent c)
 o getEastView
 public JComponent getEastView()
 o setEastView
 public void setEastView(JComponent c)
 o getMenuBar
 public JMenuBar getMenuBar()
 o setMenuBar
 public void setMenuBar(JMenuBar m)
 o setClosable
 public void setClosable(boolean b)
Set that the JInternalFrame can be closed by some user action.

 o isClosable
 public boolean isClosable()
 o isClosed
 public boolean isClosed()
 o setClosed
 public void setClosed(boolean b) throws PropertyVetoException
 o setResizable
 public void setResizable(boolean b)
Set that the JInternalFrame resizable by some user action.

 o isResizable
 public boolean isResizable()
 o setIconable
 public void setIconable(boolean b)
Set that the JInternalFrame can be made an icon by some user action.

 o isIconable
 public boolean isIconable()
 o isIcon
 public boolean isIcon()
 o setIcon
 public void setIcon(boolean b) throws PropertyVetoException
 o setMaxable
 public void setMaxable(boolean b)
Set that the JInternalFrame can be maximized by some user action.

 o isMaxable
 public boolean isMaxable()
 o isMaxed
 public boolean isMaxed()
 o setMaxed
 public void setMaxed(boolean b) throws PropertyVetoException
 o getTitle
 public String getTitle()
 o setTitle
 public void setTitle(String title)
Sets the JInternalFrame title.

 o setMain
 public void setMain(boolean main) throws PropertyVetoException
A JInternalFrame normally draws it's title bar differently if it is the main window. This normally indicates that this window has focus for the user.

 o isMain
 public boolean isMain()
 o setFrameIcon
 public void setFrameIcon(Icon icon)
 o getFrameIcon
 public Icon getFrameIcon()
 o center
 public void center()
 o moveToFront
 public void moveToFront()
Convience method that moves this component to position 0 if it's parent is a JLayeredPane.

 o moveToBack
 public void moveToBack()
Convience method that moves this component to position -1 if it's parent is a JLayeredPane.

 o frameSizeForContentSize
 public Dimension frameSizeForContentSize(int width,
                                          int height)
 o setLayer
 public void setLayer(int layer)
Convience method for setting the layer attribute of this component.

 o getLayer
 public int getLayer()
 o setPreviousBounds
 public void setPreviousBounds(Rectangle r)
 o getPreviousBounds
 public Rectangle getPreviousBounds()
 o setIconifiedBounds
 public void setIconifiedBounds(Rectangle r)
 o getIconifiedBounds
 public Rectangle getIconifiedBounds()
 o setBorder
 public void setBorder(Border b)
 o getBorder
 public Border getBorder()
 o setBackgroundPainted
 public void setBackgroundPainted(boolean b)
 o isBackgroundPainted
 public boolean isBackgroundPainted()
 o isOpaque
 public boolean isOpaque()
Overrides:
isOpaque in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index