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.
-
border
-
-
CENTER_VIEW_PROPERTY
- Bound property name.
-
centerView
-
-
closable
-
-
EAST_VIEW_PROPERTY
- Bound property name.
-
eastView
-
-
frameIcon
-
-
iconable
-
-
iconifiedBounds
-
-
IS_CLOSED_PROPERTY
- Constrained property name.
-
IS_ICON_PROPERTY
- Constrained property name.
-
IS_MAIN_PROPERTY
- Constrained property name.
-
IS_MAX_PROPERTY
- Constrained property name.
-
isClosed
-
-
isIcon
-
-
isMain
-
-
isMaxed
-
-
maxable
-
-
MENU_BAR_PROPERTY
- Bound property name.
-
menuBar
-
-
NORTH_VIEW_PROPERTY
- Bound property name.
-
northView
-
-
paintBackground
-
-
previousBounds
-
-
resizable
-
-
SOUTH_VIEW_PROPERTY
- Bound property name.
-
southView
-
-
title
-
-
TITLE_PROPERTY
- Bound property name.
-
WEST_VIEW_PROPERTY
- Bound property name.
-
westView
-
-
JInternalFrame()
- Creates a JInternalFrame with no title, and all boolean setting false.
-
JInternalFrame(String)
-
-
JInternalFrame(String, boolean)
-
-
JInternalFrame(String, boolean, boolean)
-
-
JInternalFrame(String, boolean, boolean, boolean, boolean)
-
-
add(Component)
- Redirected this call to the centerView.
-
add(Component, int)
- Redirected this call to the centerView.
-
add(Component, Object)
- Redirected this call to the centerView.
-
add(Component, Object, int)
- Redirected this call to the centerView.
-
add(String, Component)
- Redirected this call to the centerView.
-
addToFrame(JComponent)
- This method will add a component to the actual JInternalFrame.
-
addToFrame(JComponent, Object, int)
- This method will add a component to the actual JInternalFrame.
-
center()
-
-
frameSizeForContentSize(int, int)
-
-
getBorder()
-
-
getCenterView()
-
-
getEastView()
-
-
getFrameIcon()
-
-
getIconifiedBounds()
-
-
getLayer()
-
-
getMenuBar()
-
-
getNorthView()
-
-
getPreviousBounds()
-
-
getSouthView()
-
-
getTitle()
-
-
getUI()
-
-
getWestView()
-
-
isBackgroundPainted()
-
-
isClosable()
-
-
isClosed()
-
-
isIcon()
-
-
isIconable()
-
-
isMain()
-
-
isMaxable()
-
-
isMaxed()
-
-
isOpaque()
-
-
isResizable()
-
-
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.
-
remove(Component)
- Redirected this call to the centerView.
-
remove(int)
- Redirected this call to the centerView.
-
removeAll()
- Redirected this call to the centerView.
-
removeAllFromFrame()
- This method will remove all components from the actual JInternalFrame.
-
removeFromFrame(Component)
- This method will remove a component from the actual JInternalFrame.
-
removeFromFrame(int)
- This method will remove a component from the actual JInternalFrame.
-
setBackgroundPainted(boolean)
-
-
setBorder(Border)
-
-
setBounds(int, int, int, int)
- This method is overriden to call validate if there was a change in bounds.
-
setCenterView(JComponent)
-
-
setClosable(boolean)
- Set that the JInternalFrame can be closed by some user action.
-
setClosed(boolean)
-
-
setEastView(JComponent)
-
-
setFrameIcon(Icon)
-
-
setIcon(boolean)
-
-
setIconable(boolean)
- Set that the JInternalFrame can be made an icon by some user action.
-
setIconifiedBounds(Rectangle)
-
-
setLayer(int)
- Convience method for setting the layer attribute of this component.
-
setLayout(LayoutManager)
- Overridden to set the LayoutManager on the centerView of this JInternalFrame.
-
setLayoutOfFrame(LayoutManager)
- Sets the LayoutManager of the actual JInternalFrame.
-
setMain(boolean)
- A JInternalFrame normally draws it's title bar differently if it is the
main window.
-
setMaxable(boolean)
- Set that the JInternalFrame can be maximized by some user action.
-
setMaxed(boolean)
-
-
setMenuBar(JMenuBar)
-
-
setNorthView(JComponent)
-
-
setPreviousBounds(Rectangle)
-
-
setResizable(boolean)
- Set that the JInternalFrame resizable by some user action.
-
setSouthView(JComponent)
-
-
setTitle(String)
- Sets the JInternalFrame title.
-
setUI(InternalFrameUI)
-
-
setWestView(JComponent)
-
-
updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
centerView
protected JComponent centerView
northView
protected JComponent northView
southView
protected JComponent southView
westView
protected JComponent westView
eastView
protected JComponent eastView
menuBar
protected JMenuBar menuBar
closable
protected boolean closable
isClosed
protected boolean isClosed
maxable
protected boolean maxable
isMaxed
protected boolean isMaxed
iconable
protected boolean iconable
isIcon
protected boolean isIcon
resizable
protected boolean resizable
title
protected String title
isMain
protected boolean isMain
frameIcon
protected Icon frameIcon
previousBounds
protected Rectangle previousBounds
iconifiedBounds
protected Rectangle iconifiedBounds
border
protected Border border
paintBackground
protected boolean paintBackground
NORTH_VIEW_PROPERTY
public static final String NORTH_VIEW_PROPERTY
- Bound property name.
SOUTH_VIEW_PROPERTY
public static final String SOUTH_VIEW_PROPERTY
- Bound property name.
WEST_VIEW_PROPERTY
public static final String WEST_VIEW_PROPERTY
- Bound property name.
EAST_VIEW_PROPERTY
public static final String EAST_VIEW_PROPERTY
- Bound property name.
CENTER_VIEW_PROPERTY
public static final String CENTER_VIEW_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.
IS_MAIN_PROPERTY
public static final String IS_MAIN_PROPERTY
- Constrained property name.
IS_CLOSED_PROPERTY
public static final String IS_CLOSED_PROPERTY
- Constrained property name. Write-Only property.
IS_MAX_PROPERTY
public static final String IS_MAX_PROPERTY
- Constrained property name. Opposite of mimimize.
IS_ICON_PROPERTY
public static final String IS_ICON_PROPERTY
- Constrained property name.
JInternalFrame
public JInternalFrame()
- Creates a JInternalFrame with no title, and all boolean setting false.
JInternalFrame
public JInternalFrame(String title)
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 maxable,
boolean iconable)
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
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
setLayout
public void setLayout(LayoutManager m)
- Overridden to set the LayoutManager on the centerView of this JInternalFrame.
- Overrides:
- setLayout in class Container
setLayoutOfFrame
public void setLayoutOfFrame(LayoutManager m)
- Sets the LayoutManager of the actual JInternalFrame.
add
public Component add(Component comp)
- Redirected this call to the centerView.
- Overrides:
- add in class Container
add
public Component add(Component comp,
int index)
- Redirected this call to the centerView.
- Overrides:
- add in class Container
add
public void add(Component comp,
Object constraints)
- Redirected this call to the centerView.
- Overrides:
- add in class Container
add
public void add(Component comp,
Object constraints,
int index)
- Redirected this call to the centerView.
- Overrides:
- add in class Container
add
public Component add(String name,
Component comp)
- Redirected this call to the centerView.
- Overrides:
- add in class Container
remove
public void remove(int index)
- Redirected this call to the centerView.
- Overrides:
- remove in class Container
remove
public void remove(Component comp)
- Redirected this call to the centerView.
- Overrides:
- remove in class Container
removeAll
public void removeAll()
- Redirected this call to the centerView.
- Overrides:
- removeAll in class Container
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.
addToFrame
public void addToFrame(JComponent c,
Object constraints,
int index)
- This method will add a component to the actual JInternalFrame.
removeFromFrame
public void removeFromFrame(int index)
- This method will remove a component from the actual JInternalFrame.
removeFromFrame
public void removeFromFrame(Component comp)
- This method will remove a component from the actual JInternalFrame.
removeAllFromFrame
public void removeAllFromFrame()
- This method will remove all components from the actual JInternalFrame.
getCenterView
public JComponent getCenterView()
setCenterView
public void setCenterView(JComponent c)
getNorthView
public JComponent getNorthView()
setNorthView
public void setNorthView(JComponent c)
getSouthView
public JComponent getSouthView()
setSouthView
public void setSouthView(JComponent c)
getWestView
public JComponent getWestView()
setWestView
public void setWestView(JComponent c)
getEastView
public JComponent getEastView()
setEastView
public void setEastView(JComponent c)
getMenuBar
public JMenuBar getMenuBar()
setMenuBar
public void setMenuBar(JMenuBar m)
setClosable
public void setClosable(boolean b)
- Set that the JInternalFrame can be closed by some user action.
isClosable
public boolean isClosable()
isClosed
public boolean isClosed()
setClosed
public void setClosed(boolean b) throws PropertyVetoException
setResizable
public void setResizable(boolean b)
- Set that the JInternalFrame resizable by some user action.
isResizable
public boolean isResizable()
setIconable
public void setIconable(boolean b)
- Set that the JInternalFrame can be made an icon by some user action.
isIconable
public boolean isIconable()
isIcon
public boolean isIcon()
setIcon
public void setIcon(boolean b) throws PropertyVetoException
setMaxable
public void setMaxable(boolean b)
- Set that the JInternalFrame can be maximized by some user action.
isMaxable
public boolean isMaxable()
isMaxed
public boolean isMaxed()
setMaxed
public void setMaxed(boolean b) throws PropertyVetoException
getTitle
public String getTitle()
setTitle
public void setTitle(String title)
- Sets the JInternalFrame title.
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.
isMain
public boolean isMain()
setFrameIcon
public void setFrameIcon(Icon icon)
getFrameIcon
public Icon getFrameIcon()
center
public void center()
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.
frameSizeForContentSize
public Dimension frameSizeForContentSize(int width,
int height)
setLayer
public void setLayer(int layer)
- Convience method for setting the layer attribute of this component.
getLayer
public int getLayer()
setPreviousBounds
public void setPreviousBounds(Rectangle r)
getPreviousBounds
public Rectangle getPreviousBounds()
setIconifiedBounds
public void setIconifiedBounds(Rectangle r)
getIconifiedBounds
public Rectangle getIconifiedBounds()
setBorder
public void setBorder(Border b)
getBorder
public Border getBorder()
setBackgroundPainted
public void setBackgroundPainted(boolean b)
isBackgroundPainted
public boolean isBackgroundPainted()
isOpaque
public boolean isOpaque()
- Overrides:
- isOpaque in class JComponent
All Packages Class Hierarchy This Package Previous Next Index