public class JInternalFrame extends JComponent implements Accessible, WindowConstants, RootPaneContainer
一般来说,你加一个JDesktopPane JInternalFrames。UI代表的外观和感觉的具体行动,由JDesktopPane保持DesktopManager对象。
的JInternalFrame内容窗格是你添加的子组件。作为一个方便的add,remove,和这类setLayout方法被重写,所以,他们的ContentPane委托调用相应的方法。例如,你可以添加一个组件到一个内部框架如下:
internalframe添加(孩子);和孩子将被添加到内容块。内容窗格实际上是由
JRootPane实例管理,它还管理一个布局窗格,窗格玻璃,和内框可选菜单栏。请看这些组件的一个完整的描述
JRootPane文档。参考
RootPaneContainer细节添加,删除和设置一个
JInternalFrame的
LayoutManager。
警告: Swing是线程不安全的。更多信息见Swing's Threading Policy。
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans包。请看XMLEncoder。
| Modifier and Type | Class and Description |
|---|---|
protected class |
JInternalFrame.AccessibleJInternalFrame
这个类实现了对
JInternalFrame类可访问性支持。
|
static class |
JInternalFrame.JDesktopIcon
这部分是图标化版本的
JInternalFrame。
|
JComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closable
该帧可以被关闭。
|
static String |
CONTENT_PANE_PROPERTY
绑定属性名称。
|
protected JInternalFrame.JDesktopIcon |
desktopIcon
图标显示出来时,这种内部框架图标化。
|
static String |
FRAME_ICON_PROPERTY
绑定属性名称。
|
protected Icon |
frameIcon
这个内部框架的左上角显示的图标。
|
static String |
GLASS_PANE_PROPERTY
绑定属性名称。
|
protected boolean |
iconable
框架可以“图标化”(缩小并显示为一个图标的图像)。
|
static String |
IS_CLOSED_PROPERTY
约束的属性名称,该名称表示内部框架被关闭。
|
static String |
IS_ICON_PROPERTY
限制属性名称说明内部框架图标化。
|
static String |
IS_MAXIMUM_PROPERTY
约束的属性名称,该名称表示内部框架被最大化。
|
static String |
IS_SELECTED_PROPERTY
约束的属性名称表示此框已选择状态。
|
protected boolean |
isClosed
该框架已被关闭。
|
protected boolean |
isIcon
机架已经图标化。
|
protected boolean |
isMaximum
该框架已扩大到其最大尺寸。
|
protected boolean |
isSelected
该帧当前被选中。
|
static String |
LAYERED_PANE_PROPERTY
绑定属性名称。
|
protected boolean |
maximizable
该框架可以扩展到桌面窗格的大小。
|
static String |
MENU_BAR_PROPERTY
绑定属性名称。
|
protected boolean |
resizable
框架的大小可以改变。
|
static String |
ROOT_PANE_PROPERTY
绑定属性名称。
|
protected JRootPane |
rootPane
JRootPane实例的管理内容窗格和可选的菜单栏,这个内部框架,以及玻璃窗格。
|
protected boolean |
rootPaneCheckingEnabled
如果真的那么叫
add和
setLayout将被转发到
contentPane。
|
protected String |
title
标题显示在这个内部框架的标题栏中。
|
static String |
TITLE_PROPERTY
绑定属性名称。
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
JInternalFrame()
创建一个非可调整大小的,非封闭的,非不非iconifiable maximizable,标题
JInternalFrame。
|
JInternalFrame(String title)
创建一个非可调整大小的,非封闭的、非maximizable,指定标题的非iconifiable
JInternalFrame。
|
JInternalFrame(String title, boolean resizable)
创建一个非封闭的、非maximizable,与指定的标题和大小可调整的非iconifiable
JInternalFrame。
|
JInternalFrame(String title, boolean resizable, boolean closable)
创建一个非maximizable,非iconifiable
JInternalFrame指定标题的,大小可调整,并closability。
|
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
创建一个具有指定标题,非iconifiable
JInternalFrame大小可调整,closability,和maximizability。
|
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
创建一个具有指定标题,
JInternalFrame大小可调整,closability,maximizability,和iconifiability。
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addImpl(Component comp, Object constraints, int index)
添加指定的孩子
Component。
|
void |
addInternalFrameListener(InternalFrameListener l)
添加指定的侦听器以从该内部帧接收内部帧事件。
|
protected JRootPane |
createRootPane()
通过构造函数来建立
JRootPane。
|
void |
dispose()
这使内架看不见的,未被选中的,封闭的。
|
void |
doDefaultCloseAction()
火灾
INTERNAL_FRAME_CLOSING事件进行的内部框架的默认关闭操作指定的动作。
|
protected void |
fireInternalFrameEvent(int id)
火灾内部框架事件。
|
AccessibleContext |
getAccessibleContext()
获取与此相关的
AccessibleContext
JInternalFrame。
|
Container |
getContentPane()
返回此内部框架的内容窗格。
|
int |
getDefaultCloseOperation()
返回当用户在这个内部框架上启动一个“关闭”时发生的默认操作。
|
JInternalFrame.JDesktopIcon |
getDesktopIcon()
返回
JDesktopIcon时使用这种
JInternalFrame是图标化。
|
JDesktopPane |
getDesktopPane()
方便的方法,寻找祖先的层次一
JDesktop实例。
|
Container |
getFocusCycleRootAncestor()
总是返回
null因为
JInternalFrames必须始终是一个焦点遍历循环的根。
|
Component |
getFocusOwner()
如果这
JInternalFrame活跃,返回子具有焦点。
|
Icon |
getFrameIcon()
返回显示在这个内部框架的标题栏中的图像(通常在左上角)。
|
Component |
getGlassPane()
返回此内部框架的玻璃窗格。
|
InternalFrameListener[] |
getInternalFrameListeners()
返回所有的
InternalFrameListeners数组添加到这个
JInternalFrame与
addInternalFrameListener。
|
JMenuBar |
getJMenuBar()
返回当前的这
JInternalFrame
JMenuBar,或
null如果没有菜单栏已设置。
|
Cursor |
getLastCursor()
返回最后一个
Cursor这是由
setCursor方法不可调整大小的
Cursor。
|
int |
getLayer()
获取此组件的层属性的方便方法。
|
JLayeredPane |
getLayeredPane()
返回此内部框架的分层窗格。
|
JMenuBar |
getMenuBar()
过时的。
作为摇摆版本1.0.3,取而代之的
getJMenuBar()。
|
Component |
getMostRecentFocusOwner()
这
JInternalFrame返回子组件将接收焦点时,这
JInternalFrame选择。
|
Rectangle |
getNormalBounds()
如果
JInternalFrame不是最大化状态,返回
getBounds();否则,返回的
JInternalFrame将会恢复到边界。
|
JRootPane |
getRootPane()
返回该对象的内部结构
rootPane。
|
String |
getTitle()
返回的
JInternalFrame标题。
|
InternalFrameUI |
getUI()
返回呈现该组件的外观和感觉对象。
|
String |
getUIClassID()
返回呈现此组件的外观和感觉类的名称。
|
String |
getWarningString()
获取与此内部框架显示的警告字符串。
|
void |
hide() |
boolean |
isClosable()
这
JInternalFrame返回是否可以通过一些用户行为的关。
|
boolean |
isClosed()
是否这
JInternalFrame目前关闭。
|
boolean |
isFocusCycleRoot()
总是返回
true因为所有
JInternalFrames必须焦点遍历循环的根。
|
boolean |
isIcon()
返回是否
JInternalFrame目前图标化。
|
boolean |
isIconifiable()
得到
iconable属性,默认为
false。
|
boolean |
isMaximizable()
得到的
maximizable属性的值。
|
boolean |
isMaximum()
返回是否
JInternalFrame目前最大化。
|
boolean |
isResizable()
返回是否
JInternalFrame大小可以通过一些用户行为。
|
protected boolean |
isRootPaneCheckingEnabled()
返回是否调用
add和
setLayout转发给
contentPane。
|
boolean |
isSelected()
返回是否
JInternalFrame是目前“选择”或活动框架。
|
void |
moveToBack()
方便的方法,将该组件的位置1如果其母是一个
JLayeredPane。
|
void |
moveToFront()
方便的方法,将该组件的位置0如果其母是一个
JLayeredPane。
|
void |
pack()
造成这
JInternalFrame子是放在自己喜欢的大小。
|
protected void |
paintComponent(Graphics g)
以允许优化画当内部框架被拖。
|
protected String |
paramString()
返回该
JInternalFrame字符串表示形式。
|
void |
remove(Component comp)
从容器中移除指定的组件。
|
void |
removeInternalFrameListener(InternalFrameListener l)
移除指定的内部框架侦听器,以便它不再接收来自内部帧的内部帧事件。
|
void |
reshape(int x, int y, int width, int height)
移动和调整该组件。
|
void |
restoreSubcomponentFocus()
请求恢复集中到最后子有焦点的内部框架。
|
void |
setClosable(boolean b)
这
JInternalFrame设置是否可以通过一些用户行为的关。
|
void |
setClosed(boolean b)
关闭内部框架如果参数是
true。
|
void |
setContentPane(Container c)
这一集
JInternalFrame的
contentPane财产。
|
void |
setCursor(Cursor cursor)
将光标图像设置为指定的光标。
|
void |
setDefaultCloseOperation(int operation)
设置默认情况下,当用户在这个内部框架上启动一个“关闭”时,将发生的操作。
|
void |
setDesktopIcon(JInternalFrame.JDesktopIcon d)
设置与此相关的
JDesktopIcon
JInternalFrame。
|
void |
setFocusCycleRoot(boolean focusCycleRoot)
不是因为
JInternalFrames必须始终是一个焦点遍历循环的根。
|
void |
setFrameIcon(Icon icon)
设置要在内部框架的标题栏显示的图像(通常在左上角)。
|
void |
setGlassPane(Component glass)
这一集
JInternalFrame的
glassPane财产。
|
void |
setIcon(boolean b)
图标化或图标化内部框架,如果感觉支持iconification。
|
void |
setIconifiable(boolean b)
集
iconable财产,必须为用户能够使
JInternalFrame图标
true。
|
void |
setJMenuBar(JMenuBar m)
设置此
JInternalFrame的
menuBar财产。
|
void |
setLayer(int layer)
设置此组件的层属性的方便方法。
|
void |
setLayer(Integer layer)
设置此组件的层属性的方便方法。
|
void |
setLayeredPane(JLayeredPane layered)
这一集
JInternalFrame的
layeredPane财产。
|
void |
setLayout(LayoutManager manager)
确保默认情况下,此组件的布局不能被设置。
|
void |
setMaximizable(boolean b)
集
maximizable属性,决定
JInternalFrame可以通过一些用户行为最大化。
|
void |
setMaximum(boolean b)
最大化和恢复这个内部框架。
|
void |
setMenuBar(JMenuBar m)
过时的。
作为摇摆版本1.0.3取代
setJMenuBar(JMenuBar m)。
|
void |
setNormalBounds(Rectangle r)
为这个内部框架设置了正常的界限,这个内部框架将恢复到其最大化状态的界限。
|
void |
setResizable(boolean b)
设置是否
JInternalFrame大小可以通过一些用户行为。
|
protected void |
setRootPane(JRootPane root)
设置此
JInternalFrame的
rootPane财产。
|
protected void |
setRootPaneCheckingEnabled(boolean enabled)
设置是否
add和
setLayout调用转发给
contentPane。
|
void |
setSelected(boolean selected)
选择或取消选择内部框架是否显示。
|
void |
setTitle(String title)
集
JInternalFrame标题。
|
void |
setUI(InternalFrameUI ui)
设置此
JInternalFrame UI代理。
|
void |
show()
如果内部框架是不可见的,带来的内部框架到前面,使其可见,并试图选择它。
|
void |
toBack()
把这个内部框架发送到后面。
|
void |
toFront()
把这个内部框架到前面。
|
void |
updateUI()
从
UIManager,外观和感觉改变了通知。
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected JRootPane rootPane
JRootPane实例的管理内容窗格和可选的菜单栏,这个内部框架,以及玻璃窗格。
JRootPane,
RootPaneContainer
protected boolean rootPaneCheckingEnabled
add和
setLayout将被转发到
contentPane。这是最初的错误,而是被设置为true时,
JInternalFrame构造。
protected boolean closable
protected boolean isClosed
protected boolean maximizable
protected boolean isMaximum
maximizable
protected boolean iconable
protected boolean isIcon
isIcon()
protected boolean resizable
protected boolean isSelected
protected Icon frameIcon
protected String title
protected JInternalFrame.JDesktopIcon desktopIcon
iconable
public static final String CONTENT_PANE_PROPERTY
public static final String MENU_BAR_PROPERTY
public static final String TITLE_PROPERTY
public static final String LAYERED_PANE_PROPERTY
public static final String ROOT_PANE_PROPERTY
public static final String GLASS_PANE_PROPERTY
public static final String FRAME_ICON_PROPERTY
public static final String IS_SELECTED_PROPERTY
public static final String IS_CLOSED_PROPERTY
public static final String IS_MAXIMUM_PROPERTY
public static final String IS_ICON_PROPERTY
public JInternalFrame()
JInternalFrame。
public JInternalFrame(String title)
JInternalFrame。值得注意的是,通过在一个
null
title结果在未指定的行为和可能的例外。
title -非
null
String在标题栏显示
public JInternalFrame(String title, boolean resizable)
JInternalFrame。
title -
String在标题栏显示
resizable -如果
true,内框的大小可以改变
public JInternalFrame(String title, boolean resizable, boolean closable)
JInternalFrame指定标题的,大小可调整,并closability。
title -
String在标题栏显示
resizable -如果
true,内框的大小可以改变
closable -如果
true,内部框架可以关闭
public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
JInternalFrame大小可调整,closability,和maximizability。
title -
String在标题栏显示
resizable -如果
true,内框的大小可以改变
closable -如果
true,内部框架可以关闭
maximizable -如果
true,内部框架可以最大化
public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
JInternalFrame大小可调整,closability,maximizability,和iconifiability。所有的
JInternalFrame构造函数使用这一。
title -
String在标题栏显示
resizable -如果
true,内框的大小可以改变
closable -如果
true,内部框架可以关闭
maximizable -如果
true,内部框架可以最大化
iconifiable -如果
true,内部框架可以图标化
protected JRootPane createRootPane()
JRootPane。
JRootPane
JRootPane
public InternalFrameUI getUI()
InternalFrameUI对象,使得这部分
public void setUI(InternalFrameUI ui)
JInternalFrame UI代理。
ui - UI代理
public void updateUI()
UIManager,外观和感觉改变了通知。从
UIManager最新版本替换当前的UI对象。
updateUI 方法重写,继承类
JComponent
JComponent.updateUI()
public String getUIClassID()
getUIClassID 方法重写,继承类
JComponent
JComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)
protected boolean isRootPaneCheckingEnabled()
add和
setLayout转发给
contentPane。
add和
setLayout转发真;否则为false
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
setRootPaneCheckingEnabled(boolean),
RootPaneContainer
protected void setRootPaneCheckingEnabled(boolean enabled)
add和
setLayout调用转发给
contentPane。
enabled -如果
add和
setLayout转发,假如果他们应该直接在
JInternalFrame操作。
addImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
isRootPaneCheckingEnabled(),
RootPaneContainer
protected void addImpl(Component comp, Object constraints, int index)
addImpl 方法重写,继承类
Container
comp -可以提高构件的
constraints -被尊重的约束
index -指数
IllegalArgumentException -如果
index无效
IllegalArgumentException如果添加容器的家长本身
IllegalArgumentException如果增加一个窗口一个容器
setRootPaneCheckingEnabled(boolean),
RootPaneContainer
public void remove(Component comp)
comp是不是孩子的
JInternalFrame这将给
contentPane。
remove 方法重写,继承类
Container
comp -要移除的组件
NullPointerException -如果
comp是空的
Container.add(java.awt.Component),
RootPaneContainer
public void setLayout(LayoutManager manager)
contentPane。参考
RootPaneContainer更多信息。
setLayout 方法重写,继承类
Container
manager -
LayoutManager
setRootPaneCheckingEnabled(boolean)
@Deprecated public JMenuBar getMenuBar()
getJMenuBar()。
JInternalFrame
JMenuBar,或
null如果没有菜单栏已设置。
null如果没有设置
public JMenuBar getJMenuBar()
JInternalFrame
JMenuBar,或
null如果没有菜单栏已设置。
JMenuBar的内框
setJMenuBar(javax.swing.JMenuBar)
@Deprecated public void setMenuBar(JMenuBar m)
setJMenuBar(JMenuBar m)。
JInternalFrame的
menuBar财产。
m -
JMenuBar采用内部框架
getJMenuBar()
public void setJMenuBar(JMenuBar m)
JInternalFrame的
menuBar财产。
m -
JMenuBar采用内部框架
getJMenuBar()
public Container getContentPane()
getContentPane 接口
RootPaneContainer
RootPaneContainer.setContentPane(java.awt.Container)
public void setContentPane(Container c)
JInternalFrame的
contentPane财产。
setContentPane 接口
RootPaneContainer
c -内部框架内容窗格
IllegalComponentStateException -(运行时异常)如果内容窗格中的参数是
null
RootPaneContainer.getContentPane()
public JLayeredPane getLayeredPane()
getLayeredPane 接口
RootPaneContainer
JLayeredPane对象
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane),
RootPaneContainer.getLayeredPane()
public void setLayeredPane(JLayeredPane layered)
JInternalFrame的
layeredPane财产。
setLayeredPane 接口
RootPaneContainer
layered -内部框架的
JLayeredPane
IllegalComponentStateException -(运行时异常)如果参数是
null分层窗格
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
public Component getGlassPane()
getGlassPane 接口
RootPaneContainer
RootPaneContainer.setGlassPane(java.awt.Component)
public void setGlassPane(Component glass)
JInternalFrame的
glassPane财产。
setGlassPane 接口
RootPaneContainer
glass -内部框架的玻璃窗格
RootPaneContainer.getGlassPane()
public JRootPane getRootPane()
rootPane。
getRootPane 接口
RootPaneContainer
getRootPane 方法重写,继承类
JComponent
rootPane财产
RootPaneContainer.getRootPane()
protected void setRootPane(JRootPane root)
JInternalFrame的
rootPane财产。此方法被构造函数调用。
root -新的
JRootPane对象
public void setClosable(boolean b)
JInternalFrame设置是否可以通过一些用户行为的关。
b -一个布尔值,在
true意味着内部框架可以关闭
public boolean isClosable()
JInternalFrame返回是否可以通过一些用户行为的关。
true内部框架可以关闭
public boolean isClosed()
JInternalFrame目前关闭。
true内部框架是封闭的,
false否则
public void setClosed(boolean b)
throws PropertyVetoException
true。不调用此方法以
false参数;调用
setClosed(false)结果不详。
如果内部框架已经关闭,这种方法不做任何事,并立即返回。否则,该方法首先解雇INTERNAL_FRAME_CLOSING事件。然后,此方法设置closed属性true除非听者否决性质的改变。此方法完成通过内部框架不选中,然后触发一个事件INTERNAL_FRAME_CLOSED。
注:重用内部框架已被关闭,你必须将它添加到容器(即使你不把它从以前的容器)。通常,这个集装箱将先前包含内部控制框架的JDesktopPane。
b必须
true
PropertyVetoException -当尝试设置该属性的
JInternalFrame否决
isClosed(),
setDefaultCloseOperation(int),
dispose(),
InternalFrameEvent.INTERNAL_FRAME_CLOSING
public void setResizable(boolean b)
JInternalFrame大小可以通过一些用户行为。
b -布尔,在
true意味着内部框架的大小可以改变
public boolean isResizable()
JInternalFrame大小可以通过一些用户行为。
true内部框架的大小可以改变,
false否则
public void setIconifiable(boolean b)
iconable财产,必须
true为用户能够使
JInternalFrame图标。一些看起来和感觉不可能实现iconification;他们会忽略该属性。
b -布尔,在
true意味着内部框架可以图标化
public boolean isIconifiable()
iconable属性,默认为
false。
iconable属性的值。
setIconifiable(boolean)
public boolean isIcon()
JInternalFrame目前图标化。
true内部框架图标化
public void setIcon(boolean b)
throws PropertyVetoException
INTERNAL_FRAME_ICONIFIED火灾事件。如果国家改变de图标化的时候,一个
INTERNAL_FRAME_DEICONIFIED事件触发。
b -布尔,在
true手段图标内部框架和
false手段de图标
PropertyVetoException -当尝试设置该属性的
JInternalFrame否决
InternalFrameEvent.INTERNAL_FRAME_ICONIFIED,
InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED
public void setMaximizable(boolean b)
maximizable属性,决定
JInternalFrame可以通过一些用户行为最大化。一些看起来和感觉可能不支持最大化的内部框架,他们会忽略这个属性。
b -
true指定该内部框架应maximizable;
false指定不应该
public boolean isMaximizable()
maximizable属性的值。
maximizable属性的值
setMaximizable(boolean)
public boolean isMaximum()
JInternalFrame目前最大化。
true内部框架是最大化的,
false否则
public void setMaximum(boolean b)
throws PropertyVetoException
JInternalFrame相关的
JDesktopPane地区。恢复帧的大小设置为
JInternalFrame的实际大小。
b -布尔,在
true最大内部框架和
false恢复它
PropertyVetoException -当尝试设置该属性的
JInternalFrame否决
public String getTitle()
JInternalFrame标题。
String包含该内部框架的标题
setTitle(java.lang.String)
public void setTitle(String title)
JInternalFrame标题。
title可能有
null价值。
title -
String在标题栏显示
getTitle()
public void setSelected(boolean selected)
throws PropertyVetoException
JInternalFrame通常绘制标题栏不同,如果是选择的框架,这表明用户该内部框架的焦点。当这个方法改变了内部控制框架的状态,取消选中,它触发一个
InternalFrameEvent.INTERNAL_FRAME_ACTIVATED事件。如果改变是从选择取消选择,一个
InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED事件触发。
selected -布尔,在
true意味着内部框架应该成为选择(当前)和
false意味着它应该成为取消
PropertyVetoException -当尝试设置该属性的
JInternalFrame否决
Component.isShowing(),
InternalFrameEvent.INTERNAL_FRAME_ACTIVATED,
InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED
public boolean isSelected()
JInternalFrame是目前“选择”或活动框架。
true内部框架是当前选择(主动)
setSelected(boolean)
public void setFrameIcon(Icon icon)
desktopIcon对象,这是在
JDesktop图像时显示内部框架图标化。通过
null这个函数是有效的,但外观和感觉可以选择,适当的行为,如看不显示图标或默认图标和感觉。
icon -
Icon在标题栏显示
getFrameIcon()
public Icon getFrameIcon()
Icon
setFrameIcon(javax.swing.Icon)
public void moveToFront()
JLayeredPane。
public void moveToBack()
JLayeredPane。
public Cursor getLastCursor()
Cursor这是由
setCursor方法不可调整大小的
Cursor。
Cursor
public void setCursor(Cursor cursor)
contains方法返回当前光标位置,这个组件是可见的,可显示,并启用。设置一个
Container光标,光标会在所有容器的子组件显示,除了那些有一个非
null光标。
可如果java平台实现和/或本地系统不支持改变鼠标光标的形状没有视觉效果。
setCursor 方法重写,继承类
Component
cursor -一个由
Cursor类定义的常数;如果该参数为
null那么这部分将继承其父亲的光标
Component.isEnabled(),
Component.isShowing(),
Component.getCursor(),
Component.contains(int, int),
Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String),
Cursor
public void setLayer(Integer layer)
layer -
Integer对象指定这个框架的桌面层
JLayeredPane
public void setLayer(int layer)
setLayer(Integer)应该用于层值预定在
JLayeredPane。使用
setLayer(int)时,必须小心,不小心与这些价值观的冲突。
layer指定内部框架的桌面层整数
setLayer(Integer),
JLayeredPane
public int getLayer()
Integer对象指定这个框架的桌面层
JLayeredPane
public JDesktopPane getDesktopPane()
JDesktop实例。如果
JInternalFrame找到任何一个,这
desktopIcon树搜索。
JDesktopPane,或
null如果没有发现
public void setDesktopIcon(JInternalFrame.JDesktopIcon d)
JDesktopIcon
JInternalFrame。
d -
JDesktopIcon在桌面显示
getDesktopIcon()
public JInternalFrame.JDesktopIcon getDesktopIcon()
JDesktopIcon时使用这种
JInternalFrame是图标化。
JDesktopIcon
setDesktopIcon(javax.swing.JInternalFrame.JDesktopIcon)
public Rectangle getNormalBounds()
JInternalFrame不是最大化状态,返回
getBounds();否则,返回的
JInternalFrame将会恢复到边界。
Rectangle包含此框架的范围在正常状态时
public void setNormalBounds(Rectangle r)
r -该内部框架应该恢复到边界
public Component getFocusOwner()
JInternalFrame活跃,返回子具有焦点。否则,返回
null。
null如果没有儿童焦点
public Component getMostRecentFocusOwner()
JInternalFrame返回子组件将接收焦点时,这
JInternalFrame选择。如果这
JInternalFrame被选中时,该方法返回相同的成分为
getFocusOwner方法。如果这
JInternalFrame没被选中,那么最近要求重点子组件将被退回。如果没有子组件所要求的重点,那么这
JInternalFrame初始聚焦组件返回。如果没有这样的孩子的存在,那么这
JInternalFrame的默认组件集中返回。
JInternalFrame选择
getFocusOwner(),
isSelected
public void restoreSubcomponentFocus()
public void reshape(int x,
int y,
int width,
int height)
reshape 方法重写,继承类
JComponent
x -一个整数组成的新的水平位置测量的像素从其容器的左
y -一个整数组成的新的垂直位置,以像素为单位从其容器的底部
width整数像素给组件的新宽度
height整数像素给组件的新高度
Component.setBounds(int, int, int, int)
public void addInternalFrameListener(InternalFrameListener l)
l -内部帧监听器
public void removeInternalFrameListener(InternalFrameListener l)
l -内部帧监听器
public InternalFrameListener[] getInternalFrameListeners()
InternalFrameListeners数组添加到这个
JInternalFrame与
addInternalFrameListener。
InternalFrameListeners说如果没有听众已添加一个空数组
addInternalFrameListener(javax.swing.event.InternalFrameListener)
protected void fireInternalFrameEvent(int id)
id -事件被解雇的类型;下列之一:
InternalFrameEvent.INTERNAL_FRAME_OPENEDInternalFrameEvent.INTERNAL_FRAME_CLOSINGInternalFrameEvent.INTERNAL_FRAME_CLOSEDInternalFrameEvent.INTERNAL_FRAME_ICONIFIEDInternalFrameEvent.INTERNAL_FRAME_DEICONIFIEDInternalFrameEvent.INTERNAL_FRAME_ACTIVATEDInternalFrameEvent.INTERNAL_FRAME_DEACTIVATEDpublic void doDefaultCloseAction()
INTERNAL_FRAME_CLOSING事件进行的内部框架的默认关闭操作指定的动作。此方法通常由外观和感觉实现的内部框架的关闭按钮的动作处理程序调用。
setDefaultCloseOperation(int),
InternalFrameEvent.INTERNAL_FRAME_CLOSING
public void setDefaultCloseOperation(int operation)
DO_NOTHING_ON_CLOSE
windowClosing方法注册
InternalFrameListener对象。
HIDE_ON_CLOSE
DISPOSE_ON_CLOSE
默认值是DISPOSE_ON_CLOSE。执行指定的关闭操作之前,内部框架火灾INTERNAL_FRAME_CLOSING事件。
operation -下面的定义
javax.swing.WindowConstants常数(一个接口实现的
JInternalFrame):
DO_NOTHING_ON_CLOSE,
HIDE_ON_CLOSE,或
DISPOSE_ON_CLOSE
addInternalFrameListener(javax.swing.event.InternalFrameListener),
getDefaultCloseOperation(),
JComponent.setVisible(boolean),
dispose(),
InternalFrameEvent.INTERNAL_FRAME_CLOSING
public int getDefaultCloseOperation()
setDefaultCloseOperation(int)
public void pack()
JInternalFrame子是放在自己喜欢的大小。这是图像化或最大化的内部框架是首先恢复,然后装。如果内部框架无法恢复,它的状态不会改变,也不会被包装。
Window.pack()
public void show()
INTERNAL_FRAME_OPENED火灾事件。如果内部框架已经可见,这种方法将不会做任何事。调用该方法具有相同的结果
setVisible(true)调用。
public void hide()
JComponent
hide 方法重写,继承类
JComponent
public void dispose()
INTERNAL_FRAME_CLOSED火灾事件。调用此方法的结果是相似的
setClosed(true),但
dispose总是成功地关闭内部框架不火
INTERNAL_FRAME_CLOSING事件。
public void toFront()
Window.toFront(),
moveToFront()
public void toBack()
Window.toBack(),
moveToBack()
public final void setFocusCycleRoot(boolean focusCycleRoot)
JInternalFrames必须始终是一个焦点遍历循环的根。
setFocusCycleRoot 方法重写,继承类
Container
focusCycleRoot -这个值被忽略
isFocusCycleRoot(),
Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy),
Container.getFocusTraversalPolicy()
public final boolean isFocusCycleRoot()
true因为所有
JInternalFrames必须焦点遍历循环的根。
isFocusCycleRoot 方法重写,继承类
Container
true
setFocusCycleRoot(boolean),
Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy),
Container.getFocusTraversalPolicy()
public final Container getFocusCycleRootAncestor()
null因为
JInternalFrames必须始终是一个焦点遍历循环的根。
getFocusCycleRootAncestor 方法重写,继承类
Component
null
Container.isFocusCycleRoot()
public final String getWarningString()
null。
null
Window.getWarningString()
protected String paramString()
JInternalFrame字符串表示形式。此方法仅用于调试目的,返回的字符串的内容和格式可能会在实现过程中有所不同。返回的字符串是空的但可能不
null。
paramString 方法重写,继承类
JComponent
JInternalFrame字符串表示形式
protected void paintComponent(Graphics g)
paintComponent 方法重写,继承类
JComponent
g -
Graphics对象保护
JComponent.paint(java.awt.Graphics),
ComponentUI
public AccessibleContext getAccessibleContext()
AccessibleContext
JInternalFrame。内部框架的
AccessibleContext以对象的形式的一个
AccessibleJInternalFrame。一个新的
AccessibleJInternalFrame实例被创建时。
getAccessibleContext 接口
Accessible
getAccessibleContext 方法重写,继承类
Component
AccessibleJInternalFrame作为本
JInternalFrame的
AccessibleContext
JInternalFrame.AccessibleJInternalFrame
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.