public class JInternalFrame extends JComponent implements Accessible, WindowConstants, RootPaneContainer
一般来说,你加一个JDesktopPane
JInternalFrame
s。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.AccessibleJComponent
Container.AccessibleAWTContainer
Component.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_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, 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 因为
JInternalFrame s必须始终是一个焦点遍历循环的根。
|
Component |
getFocusOwner()
如果这
JInternalFrame 活跃,返回子具有焦点。
|
Icon |
getFrameIcon()
返回显示在这个内部框架的标题栏中的图像(通常在左上角)。
|
Component |
getGlassPane()
返回此内部框架的玻璃窗格。
|
InternalFrameListener[] |
getInternalFrameListeners()
返回所有的
InternalFrameListener s数组添加到这个
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 因为所有
JInternalFrame s必须焦点遍历循环的根。
|
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)
不是因为
JInternalFrame s必须始终是一个焦点遍历循环的根。
|
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, update
add, 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, validateTree
action, 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, transferFocusUpCycle
protected 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()
InternalFrameListener
s数组添加到这个
JInternalFrame
与
addInternalFrameListener
。
InternalFrameListener
s说如果没有听众已添加一个空数组
addInternalFrameListener(javax.swing.event.InternalFrameListener)
protected void fireInternalFrameEvent(int id)
id
-事件被解雇的类型;下列之一:
InternalFrameEvent.INTERNAL_FRAME_OPENED
InternalFrameEvent.INTERNAL_FRAME_CLOSING
InternalFrameEvent.INTERNAL_FRAME_CLOSED
InternalFrameEvent.INTERNAL_FRAME_ICONIFIED
InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED
InternalFrameEvent.INTERNAL_FRAME_ACTIVATED
InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED
public 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)
JInternalFrame
s必须始终是一个焦点遍历循环的根。
setFocusCycleRoot
方法重写,继承类
Container
focusCycleRoot
-这个值被忽略
isFocusCycleRoot()
,
Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy)
,
Container.getFocusTraversalPolicy()
public final boolean isFocusCycleRoot()
true
因为所有
JInternalFrame
s必须焦点遍历循环的根。
isFocusCycleRoot
方法重写,继承类
Container
true
setFocusCycleRoot(boolean)
,
Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy)
,
Container.getFocusTraversalPolicy()
public final Container getFocusCycleRootAncestor()
null
因为
JInternalFrame
s必须始终是一个焦点遍历循环的根。
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.