- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JInternalFrame
-
- All Implemented Interfaces:
-
ImageObserver,MenuContainer,Serializable,Accessible,RootPaneContainer,WindowConstants
@JavaBean(defaultProperty="JMenuBar", description="A frame container which is contained within another window.") public class JInternalFrame extends JComponent implements Accessible, WindowConstants, RootPaneContainer
一个轻量级对象,提供了本机框架的许多功能,包括拖动,关闭,成为图标,调整大小,标题显示以及对菜单栏的支持。 有关面向任务的文档和使用内部框架的示例,请参阅“Java教程”中的“ How to Use Internal Frames ”一节。一般来说,您将
JInternalFrame添加到JDesktopPane。 该UI委托的外观和感觉,具体行动到DesktopManager由维护对象JDesktopPane。JInternalFrame内容窗格是您添加子组件的位置。 为方便起见,在add,remove,并setLayout这个类的方法将被覆盖,所以他们委托给相应方法的调用ContentPane。 例如,您可以将子组件添加到内部框架,如下所示:internalFrame.add(child);而孩子将被添加到contentPane。 内容窗格实际上由JRootPane的实例管理,该实例还管理内部框架的布局窗格,玻璃窗格和可选菜单栏。 有关这些组件的完整说明,请参阅JRootPane文档。 请参阅RootPaneContainer的详细信息,添加,删除和设置LayoutManager一个的JInternalFrame。警告: Swing不是线程安全的。 有关详细信息,请参阅Swing's Threading Policy 。
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对所有JavaBeans的长期存储的支持已被添加到
java.beans软件包中。 请参阅XMLEncoder。- 从以下版本开始:
- 1.2
- 另请参见:
-
InternalFrameEvent,JDesktopPane,DesktopManager,JInternalFrame.JDesktopIcon,JRootPane,RootPaneContainer, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 描述 protected classJInternalFrame.AccessibleJInternalFrame这个类实现JInternalFrame类的可访问性支持。static classJInternalFrame.JDesktopIcon该组件代表JInternalFrame的图标化版本。-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field 描述 protected booleanclosable框架可以关闭。static StringCONTENT_PANE_PROPERTY绑定属性名称。protected JInternalFrame.JDesktopIcondesktopIcon当内部框架被图标化时显示的图标。static StringFRAME_ICON_PROPERTY绑定属性名称。protected IconframeIcon该内部框架左上角显示的图标。static StringGLASS_PANE_PROPERTY绑定属性名称。protected booleaniconable框架可以“图标化”(缩小并显示为图标图像)。static StringIS_CLOSED_PROPERTY内部框架关闭的约束属性名称。static StringIS_ICON_PROPERTY指示内部框架被图标化的约束属性名称。static StringIS_MAXIMUM_PROPERTY指示内部框架最大化的约束属性名称。static StringIS_SELECTED_PROPERTY受限属性名称表示此框已选择状态。protected booleanisClosed框架已关闭。protected booleanisIcon框架已经被图标化了。protected booleanisMaximum框架已经扩展到最大尺寸。protected booleanisSelected该帧当前被选中。static StringLAYERED_PANE_PROPERTY绑定属性名称。protected booleanmaximizable该框架可以扩展到桌面窗格的大小。static StringMENU_BAR_PROPERTY绑定属性名称。protected booleanresizable框架的尺寸可以更改。static StringROOT_PANE_PROPERTY绑定属性名称。protected JRootPanerootPane管理内容窗格的JRootPane实例,以及该内部框架的可选菜单栏以及玻璃窗格。protected booleanrootPaneCheckingEnabled如果是,那么拨打add和setLayout电话将被转发到contentPane。protected Stringtitle标题显示在此内部框架的标题栏中。static StringTITLE_PROPERTY绑定属性名称。-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
-
构造方法摘要
构造方法 Constructor 描述 JInternalFrame()创建一个不可调整大小,不可关闭,不可最大化,非图形化的JInternalFrame,没有标题。JInternalFrame(String title)创建一个不可调整大小,不可关闭,不可最大化,非图形化的JInternalFrame具有指定的标题。JInternalFrame(String title, boolean resizable)创建一个不可关闭,不可最大化,非图形化的JInternalFrame具有指定的标题和可JInternalFrame性。JInternalFrame(String title, boolean resizable, boolean closable)创建一个不可最大化的,非图形化的JInternalFrame具有指定的标题,可重定位性和可关闭性。JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)创建一个不可图标的JInternalFrame具有指定的标题,可重定位性,可关闭性和最大化性。JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)创建一个JInternalFrame具有指定的标题,可重定位性,可关闭性,最大化和可图标性。
-
方法摘要
所有方法 接口方法 具体的方法 弃用的方法 Modifier and Type 方法 描述 protected voidaddImpl(Component comp, Object constraints, int index)添加指定的小孩Component。voidaddInternalFrameListener(InternalFrameListener l)添加指定的侦听器以从该内部帧接收内部帧事件。protected JRootPanecreateRootPane()由构造函数调用来设置JRootPane。voiddispose()使此内部框架不可见,未选择并关闭。voiddoDefaultCloseAction()触发INTERNAL_FRAME_CLOSING事件,然后执行内部框架默认关闭操作指定的操作。protected voidfireInternalFrameEvent(int id)触发内部框架事件。AccessibleContextgetAccessibleContext()获取AccessibleContext与此JInternalFrame相关联。ContainergetContentPane()返回此内部框架的内容窗格。intgetDefaultCloseOperation()返回用户在此内部框架上启动“关闭”时发生的默认操作。JInternalFrame.JDesktopIcongetDesktopIcon()返回JDesktopIcon当这个JInternalFrame被图标化时使用。JDesktopPanegetDesktopPane()在一个JDesktop实例中搜索祖先层次结构的便捷方法。ContainergetFocusCycleRootAncestor()始终返回null因为JInternalFrame必须始终是焦点遍历循环的根。ComponentgetFocusOwner()如果此JInternalFrame处于活动状态,则返回具有焦点的小孩。IcongetFrameIcon()返回显示在该内部框架的标题栏中的图像(通常位于左上角)。ComponentgetGlassPane()返回此内部框架的玻璃窗格。InternalFrameListener[]getInternalFrameListeners()返回所有InternalFrameListener的数组,添加到这个JInternalFrame与addInternalFrameListener。JMenuBargetJMenuBar()如果没有设置菜单栏,则返回JMenuBar的当前JInternalFrame,或null。CursorgetLastCursor()返回由setCursor方法设置的最后一个Cursor,该方法不是可调整大小的Cursor。intgetLayer()获取此组件的图层属性的便捷方法。JLayeredPanegetLayeredPane()返回此内部框架的分层窗格。JMenuBargetMenuBar()已过时。截至Swing 1.0.3版,由getJMenuBar()替代。ComponentgetMostRecentFocusOwner()返回此JInternalFrame的子组件,当选择此JInternalFrame时将收到焦点。RectanglegetNormalBounds()如果JInternalFrame未处于最大化状态,则返回getBounds(); 否则,返回JInternalFrame将被还原的范围。JRootPanegetRootPane()返回此内部框架的rootPane对象。StringgetTitle()返回JInternalFrame的标题。InternalFrameUIgetUI()返回渲染此组件的外观和对象。StringgetUIClassID()返回呈现此组件的look-and-feel类的名称。StringgetWarningString()获取与此内部框架一起显示的警告字符串。voidhide()booleanisClosable()返回是否可以通过某些用户操作关闭此JInternalFrame。booleanisClosed()返回此JInternalFrame当前是否关闭。booleanisFocusCycleRoot()始终返回true因为所有JInternalFrame必须是焦点遍历循环的根。booleanisIcon()返回JInternalFrame是否被图标化。booleanisIconifiable()获取iconable属性,默认为false。booleanisMaximizable()获取maximizable属性的值。booleanisMaximum()返回JInternalFrame是否最大化。booleanisResizable()返回是否可以通过某些用户操作调整JInternalFrame大小。protected booleanisRootPaneCheckingEnabled()返回是否将add和setLayout呼叫转发到contentPane。booleanisSelected()返回JInternalFrame是否为当前“选定”或活动帧。voidmoveToBack()如果该组件的父级是一个JLayeredPane,则将该组件移动到位置-1的方便方法。voidmoveToFront()便利方法将该组件移动到位置0,如果其父对象是一个JLayeredPane。voidpack()导致此JInternalFrame子组件以其首选大小布局。protected voidpaintComponent(Graphics g)被覆盖以允许在拖动内部框架时优化绘画。protected StringparamString()返回此JInternalFrame的字符串表示JInternalFrame。voidremove(Component comp)从容器中删除指定的组件。voidremoveInternalFrameListener(InternalFrameListener l)删除指定的内部帧监听器,使其不再从该内部帧接收内部帧事件。voidreshape(int x, int y, int width, int height)移动并调整此组件的大小。voidrestoreSubcomponentFocus()请求内部框架将焦点恢复到具有焦点的最后一个子组件。voidsetClosable(boolean b)设置这个JInternalFrame是否可以通过某些用户操作关闭。voidsetClosed(boolean b)如果参数为true则关闭此内部框架。voidsetContentPane(Container c)设置此JInternalFrame的contentPane属性。voidsetCursor(Cursor cursor)将光标图像设置为指定的光标。voidsetDefaultCloseOperation(int operation)设置用户在此内部框架上启动“关闭”时默认执行的操作。voidsetDesktopIcon(JInternalFrame.JDesktopIcon d)设置JDesktopIcon与此JInternalFrame相关联。voidsetFocusCycleRoot(boolean focusCycleRoot)JInternalFrame因为JInternalFrame必须始终是焦点遍历循环的根源。voidsetFrameIcon(Icon icon)设置要显示在该内部框架的标题栏中的图像(通常位于左上角)。voidsetGlassPane(Component glass)设置此JInternalFrame的glassPane属性。voidsetIcon(boolean b)如果外观和感觉支持图标化,则可以对该内部框架进行图标化或去图标化。voidsetIconifiable(boolean b)设置iconable属性,该属性必须为true才能使用户创建JInternalFrame图标。voidsetJMenuBar(JMenuBar m)设置menuBar属性为JInternalFrame。voidsetLayer(int layer)设置此组件的图层属性的便利方法。voidsetLayer(Integer layer)设置此组件的图层属性的便利方法。voidsetLayeredPane(JLayeredPane layered)设置这个JInternalFrame的layeredPane属性。voidsetLayout(LayoutManager manager)确保默认情况下,无法设置此组件的布局。voidsetMaximizable(boolean b)设置maximizable属性,它决定了一些用户操作是否可以最大化JInternalFrame。voidsetMaximum(boolean b)最大化和恢复这个内部框架。voidsetMenuBar(JMenuBar m)已过时。从Swing版本1.0.3替换为setJMenuBar(JMenuBar m)。voidsetNormalBounds(Rectangle r)设置此内部框架的正常范围,该内部框架将从其最大化状态恢复到的边界。voidsetResizable(boolean b)设置JInternalFrame是否可以通过某些用户操作调整大小。protected voidsetRootPane(JRootPane root)为此JInternalFrame设置rootPane属性。protected voidsetRootPaneCheckingEnabled(boolean enabled)设置是否向add转发到add和setLayout的contentPane。voidsetSelected(boolean selected)如果显示内部框架,请选择或取消选择。voidsetTitle(String title)设置JInternalFrame标题。voidsetUI(InternalFrameUI ui)设置这个JInternalFrame的UIJInternalFrame。voidshow()如果内部框架不可见,将内部框架放在前面,使其可见,并尝试选择它。voidtoBack()将这个内部框架发送到后面。voidtoFront()将这个内部框架放在前面。voidupdateUI()通知从UIManager的外观和感觉已经改变。-
Methods inherited from class java.awt.Component
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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.awt.Container
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
-
Methods inherited from class javax.swing.JComponent
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
-
-
-
-
字段详细信息
-
rootPane
protected JRootPane rootPane
管理内容窗格的JRootPane实例,以及该内部框架的可选菜单栏以及玻璃窗格。- 另请参见:
-
JRootPane,RootPaneContainer
-
rootPaneCheckingEnabled
protected boolean rootPaneCheckingEnabled
如果是,那么拨打add和setLayout电话将被转发到contentPane。 这最初是假的,但是当构建JInternalFrame时设置为true。
-
closable
protected boolean closable
框架可以关闭。
-
isClosed
protected boolean isClosed
框架已关闭。
-
maximizable
protected boolean maximizable
该框架可以扩展到桌面窗格的大小。
-
isMaximum
protected boolean isMaximum
框架已经扩展到最大尺寸。- 另请参见:
-
maximizable
-
iconable
protected boolean iconable
框架可以“图标化”(缩小并显示为图标图像)。
-
isIcon
protected boolean isIcon
框架已经被图标化了。- 另请参见:
-
isIcon()
-
resizable
protected boolean resizable
框架的尺寸可以更改。
-
isSelected
protected boolean isSelected
该帧当前被选中。
-
frameIcon
protected Icon frameIcon
该内部框架左上角显示的图标。
-
title
protected String title
标题显示在此内部框架的标题栏中。
-
desktopIcon
protected JInternalFrame.JDesktopIcon desktopIcon
当内部框架被图标化时显示的图标。- 另请参见:
-
iconable
-
CONTENT_PANE_PROPERTY
public static final String CONTENT_PANE_PROPERTY
绑定属性名称。- 另请参见:
- Constant Field Values
-
MENU_BAR_PROPERTY
public static final String MENU_BAR_PROPERTY
绑定属性名称。- 另请参见:
- Constant Field Values
-
TITLE_PROPERTY
public static final String TITLE_PROPERTY
绑定属性名称。- 另请参见:
- Constant Field Values
-
LAYERED_PANE_PROPERTY
public static final String LAYERED_PANE_PROPERTY
绑定属性名称。- 另请参见:
- Constant Field Values
-
ROOT_PANE_PROPERTY
public static final String ROOT_PANE_PROPERTY
绑定属性名称。- 另请参见:
- Constant Field Values
-
GLASS_PANE_PROPERTY
public static final String GLASS_PANE_PROPERTY
绑定属性名称。- 另请参见:
- Constant Field Values
-
FRAME_ICON_PROPERTY
public static final String FRAME_ICON_PROPERTY
绑定属性名称。- 另请参见:
- Constant Field Values
-
IS_SELECTED_PROPERTY
public static final String IS_SELECTED_PROPERTY
受限属性名称表示此框已选择状态。- 另请参见:
- Constant Field Values
-
IS_CLOSED_PROPERTY
public static final String IS_CLOSED_PROPERTY
内部框架关闭的约束属性名称。- 另请参见:
- Constant Field Values
-
IS_MAXIMUM_PROPERTY
public static final String IS_MAXIMUM_PROPERTY
指示内部框架最大化的约束属性名称。- 另请参见:
- Constant Field Values
-
IS_ICON_PROPERTY
public static final String IS_ICON_PROPERTY
指示内部框架被图标化的约束属性名称。- 另请参见:
- Constant Field Values
-
-
构造方法详细信息
-
JInternalFrame
public JInternalFrame()
创建一个不可调整大小,不可关闭,不可最大化,非图形化的JInternalFrame,没有标题。
-
JInternalFrame
public JInternalFrame(String title)
创建一个不可调整大小,不可关闭,不可最大化,非图形化的JInternalFrame与指定的标题。 请注意,传递一个nulltitle导致未指定的行为,并可能导致异常。- 参数
-
title- 在标题栏中显示的非nullString
-
JInternalFrame
public JInternalFrame(String title, boolean resizable)
创建一个不可关闭,不可最大化,非图形化的JInternalFrame具有指定的标题和可JInternalFrame性。- 参数
-
title- 要显示在标题栏中的String -
resizable- 如果是true,可以调整内部框架的大小
-
JInternalFrame
public JInternalFrame(String title, boolean resizable, boolean closable)
创建一个不可最大化,非图形化的JInternalFrame具有指定的标题,可重定位性和可关闭性。- 参数
-
title- 在标题栏中显示的String -
resizable- 如果为true,则可以调整内部框架的大小 -
closable- 如果是true,可以关闭内部框架
-
JInternalFrame
public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
创建一个不可图标的JInternalFrame具有指定的标题,可重定位性,可关闭性和最大化性。- 参数
-
title- 要显示在标题栏中的String -
resizable- 如果是true,可以调整内部框架的大小 -
closable- 如果是true,可以关闭内部框架 -
maximizable- 如果是true,则内部框架可以最大化
-
JInternalFrame
public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
创建一个JInternalFrame具有指定的标题,可重定向性,可关闭性,最大化性和可图标性。 所有JInternalFrame构造函数都使用这个。- 参数
-
title- 在标题栏中显示String -
resizable- 如果是true,则可以调整内部框架的大小 -
closable- 如果是true,可以关闭内部框架 -
maximizable- 如果是true,则内部框架可以最大化 -
iconifiable- 如果是true,内部框架可以图标化
-
-
方法详细信息
-
createRootPane
protected JRootPane createRootPane()
由构造函数调用设置JRootPane。- 结果
-
一个新的
JRootPane - 另请参见:
-
JRootPane
-
getUI
public InternalFrameUI getUI()
返回渲染此组件的外观和对象。- 重写:
-
getUI在JComponent - 结果
-
呈现此组件的
InternalFrameUI对象
-
setUI
@BeanProperty(hidden=true, visualUpdate=true, description="The UI object that implements the Component\'s LookAndFeel.") public void setUI(InternalFrameUI ui)
设置这个JInternalFrame的UIJInternalFrame。- 参数
-
ui- UI委托
-
updateUI
public void updateUI()
通知从UIManager的外观和感觉已经改变。 用UIManager替换最新版本的当前UI对象。- 重写:
-
updateUI在JComponent - 另请参见:
-
JComponent.updateUI()
-
getUIClassID
@BeanProperty(bound=false, description="UIClassID") public String getUIClassID()
返回呈现此组件的look-and-feel类的名称。- 重写:
-
getUIClassID在JComponent - 结果
- 字符串“InternalFrameUI”
- 另请参见:
-
JComponent.getUIClassID(),UIDefaults.getUI(javax.swing.JComponent)
-
isRootPaneCheckingEnabled
protected boolean isRootPaneCheckingEnabled()
返回是否将add和setLayout电话转发到contentPane。- 结果
-
如果转发
add和add,setLayouttrue; 否则为假 - 另请参见:
-
addImpl(java.awt.Component, java.lang.Object, int),setLayout(java.awt.LayoutManager),setRootPaneCheckingEnabled(boolean),RootPaneContainer
-
setRootPaneCheckingEnabled
@BeanProperty(hidden=true, description="Whether the add and setLayout methods are forwarded") protected void setRootPaneCheckingEnabled(boolean enabled)
设置是否将add和setLayout呼叫转发到contentPane。- 参数
-
enabled- 如果add和setLayout被转发,则为true,如果它们应直接在JInternalFrame上操作,JInternalFrame。 - 另请参见:
-
addImpl(java.awt.Component, java.lang.Object, int),setLayout(java.awt.LayoutManager),isRootPaneCheckingEnabled(),RootPaneContainer
-
addImpl
protected void addImpl(Component comp, Object constraints, int index)
添加指定的小孩Component。 该方法被覆盖以有条件地将呼叫转发到contentPane。 默认情况下,将小孩添加到contentPane而不是框架,详情请参阅RootPaneContainer。- 重写:
-
addImpl在Container - 参数
-
comp- 要增强的组件 -
constraints- 要遵守的约束 -
index- 索引 - 异常
-
IllegalArgumentException- 如果index无效 -
IllegalArgumentException- 如果将容器的父项添加到自身 -
IllegalArgumentException- 如果向容器添加窗口 - 另请参见:
-
setRootPaneCheckingEnabled(boolean),RootPaneContainer
-
remove
public void remove(Component comp)
从容器中删除指定的组件。 如果comp不是一个孩子JInternalFrame这将调用转发到contentPane。- 重写:
-
remove在Container - 参数
-
comp- 要删除的组件 - 异常
-
NullPointerException- 如果comp为空 - 另请参见:
-
Container.add(java.awt.Component),RootPaneContainer
-
setLayout
public void setLayout(LayoutManager manager)
- 重写:
-
setLayout在Container - 参数
-
manager-LayoutManager - 另请参见:
-
setRootPaneCheckingEnabled(boolean)
-
getMenuBar
@Deprecated public JMenuBar getMenuBar()
已过时。 截至Swing 1.0.3版本,由getJMenuBar()替换。如果没有设置菜单栏,则返回JMenuBar的当前JInternalFrame,或null。- 结果
-
当前菜单栏,如果没有设置,
null
-
getJMenuBar
public JMenuBar getJMenuBar()
如果没有设置菜单栏,则返回JMenuBar的当前JInternalFrame,或null。- 结果
-
这个内部框架使用的
JMenuBar - 另请参见:
-
setJMenuBar(javax.swing.JMenuBar)
-
setMenuBar
@Deprecated public void setMenuBar(JMenuBar m)
已过时。 从Swing版本1.0.3替换为setJMenuBar(JMenuBar m)。设置menuBar属性用于此JInternalFrame。- 参数
-
m- 在这个内部框架中使用的JMenuBar - 另请参见:
-
getJMenuBar()
-
setJMenuBar
@BeanProperty(preferred=true, description="The menu bar for accessing pulldown menus from this internal frame.") public void setJMenuBar(JMenuBar m)
为此JInternalFrame设置menuBar属性。- 参数
-
m- 在这个内部框架中使用的JMenuBar - 另请参见:
-
getJMenuBar()
-
getContentPane
public Container getContentPane()
返回此内部框架的内容窗格。- Specified by:
-
getContentPane在接口RootPaneContainer - 结果
- 内容窗格
- 另请参见:
-
RootPaneContainer.setContentPane(java.awt.Container)
-
setContentPane
@BeanProperty(hidden=true, description="The client area of the internal frame where child components are normally inserted.") public void setContentPane(Container c)
设置这JInternalFrame的contentPane属性。- Specified by:
-
setContentPane在接口RootPaneContainer - 参数
-
c- 此内部框架的内容窗格 - 异常
-
IllegalComponentStateException- (运行时异常)如果内容窗格参数是null - 另请参见:
-
RootPaneContainer.getContentPane()
-
getLayeredPane
public JLayeredPane getLayeredPane()
返回此内部框架的分层窗格。- Specified by:
-
getLayeredPane在接口RootPaneContainer - 结果
-
一个
JLayeredPane对象 - 另请参见:
-
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane),RootPaneContainer.getLayeredPane()
-
setLayeredPane
@BeanProperty(hidden=true, description="The pane which holds the various desktop layers.") public void setLayeredPane(JLayeredPane layered)
设置这个JInternalFrame的layeredPane属性。- Specified by:
-
setLayeredPane在接口RootPaneContainer - 参数
-
layered- 该内部框架的JLayeredPane - 异常
-
IllegalComponentStateException- (运行时异常)如果分层窗格参数为null - 另请参见:
-
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
-
getGlassPane
public Component getGlassPane()
返回此内部框架的玻璃窗格。- Specified by:
-
getGlassPane在接口RootPaneContainer - 结果
- 玻璃窗
- 另请参见:
-
RootPaneContainer.setGlassPane(java.awt.Component)
-
setGlassPane
@BeanProperty(hidden=true, description="A transparent pane used for menu rendering.") public void setGlassPane(Component glass)
设置这个JInternalFrame的glassPane属性。- Specified by:
-
setGlassPane在接口RootPaneContainer - 参数
-
glass- 此内部框架的玻璃窗格 - 另请参见:
-
RootPaneContainer.getGlassPane()
-
getRootPane
@BeanProperty(hidden=true, description="The root pane used by this internal frame.") public JRootPane getRootPane()
返回此内部框架的rootPane对象。- Specified by:
-
getRootPane在接口RootPaneContainer - 重写:
-
getRootPane在JComponent - 结果
-
rootPane属性 - 另请参见:
-
RootPaneContainer.getRootPane()
-
setRootPane
protected void setRootPane(JRootPane root)
为此JInternalFrame设置rootPane属性。 该方法由构造函数调用。- 参数
-
root- 新的JRootPane对象
-
setClosable
@BeanProperty(preferred=true, description="Indicates whether this internal frame can be closed.") public void setClosable(boolean b)
设置这个JInternalFrame是否可以通过某些用户操作关闭。- 参数
-
b- 一个布尔值,其中true表示该内部框架可以关闭
-
isClosable
public boolean isClosable()
返回是否可以通过某些用户操作关闭此JInternalFrame。- 结果
-
true如果这个内部框架可以关闭
-
isClosed
public boolean isClosed()
返回此JInternalFrame当前是否关闭。- 结果
-
true如果内部框架关闭,否则为false
-
setClosed
@BeanProperty(description="Indicates whether this internal frame has been closed.") 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
-
setResizable
@BeanProperty(preferred=true, description="Determines whether this internal frame can be resized by the user.") public void setResizable(boolean b)
设置JInternalFrame是否可以通过某些用户操作调整大小。- 参数
-
b- 一个布尔值,其中true表示这个内部框架可以调整大小
-
isResizable
public boolean isResizable()
返回是否可以通过某些用户操作调整JInternalFrame大小。- 结果
-
true如果这个内部框架可以调整大小,否则为false
-
setIconifiable
@BeanProperty(preferred=true, description="Determines whether this internal frame can be iconified.") public void setIconifiable(boolean b)
设置iconable属性,它必须是true,以便用户能够使JInternalFrame成为一个图标。 有些看起来和感觉可能不会实现图标化; 他们将忽略此属性。- 参数
-
b- 一个布尔值,其中true表示这个内部框架可以图标化
-
isIconifiable
public boolean isIconifiable()
获取iconable属性,默认为false。- 结果
-
该值为
iconable属性。 - 另请参见:
-
setIconifiable(boolean)
-
isIcon
public boolean isIcon()
返回JInternalFrame是否被图标化。- 结果
-
true如果这个内部框架被图标化
-
setIcon
@BeanProperty(description="The image displayed when this internal frame is minimized.") public void setIcon(boolean b) throws PropertyVetoException
如果外观和感觉支持图标化,则可以对该内部框架进行图标化或去图标化。 如果内部框架的状态改变为图标化,则此方法将触发INTERNAL_FRAME_ICONIFIED事件。 如果状态更改为去图标化,则会触发INTERNAL_FRAME_DEICONIFIED事件。- 参数
-
b- 一个布尔值,其中true意味着图标化这个内部框架,而false意味着去除图标化 - 异常
-
PropertyVetoException- 当设置属性的尝试被否决了JInternalFrame - 另请参见:
-
InternalFrameEvent.INTERNAL_FRAME_ICONIFIED,InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED
-
setMaximizable
@BeanProperty(preferred=true, description="Determines whether this internal frame can be maximized.") public void setMaximizable(boolean b)
设置maximizable属性,它决定了一些用户操作是否可以最大化JInternalFrame。 一些外观和感觉可能不支持最大化内部框架; 他们将忽略此属性。- 参数
-
b-true以指定该内部框架应该是最大化的;false来指定它不应该是
-
isMaximizable
public boolean isMaximizable()
获取maximizable属性的值。- 结果
-
的价值
maximizable属性 - 另请参见:
-
setMaximizable(boolean)
-
isMaximum
public boolean isMaximum()
返回JInternalFrame是否最大化。- 结果
-
true如果这个内部框架被最大化,否则为false
-
setMaximum
@BeanProperty(description="Indicates whether this internal frame is maximized.") public void setMaximum(boolean b) throws PropertyVetoException
最大化和恢复这个内部框架。 甲最大化帧被调整大小以完全适应JDesktopPane与相关联的区域JInternalFrame。 恢复的帧的大小设置为JInternalFrame的实际大小。- 参数
-
b- 一个布尔值,其中true最大化这个内部框架,false恢复它 - 异常
-
PropertyVetoException- 当设置属性的尝试被否决了JInternalFrame
-
getTitle
public String getTitle()
返回JInternalFrame的标题。- 结果
-
一个
String包含这个内部框架的标题 - 另请参见:
-
setTitle(java.lang.String)
-
setTitle
@BeanProperty(preferred=true, description="The text displayed in the title bar.") public void setTitle(String title)
设置JInternalFrame标题。title可能有一个null值。- 参数
-
title- 要显示在标题栏中的String - 另请参见:
-
getTitle()
-
setSelected
@BeanProperty(description="Indicates whether this internal frame is currently the active frame.") public void setSelected(boolean selected) throws PropertyVetoException
如果显示内部框架,请选择或取消选择。 AJInternalFrame如果是所选择的帧,则通常绘制其标题栏,这向用户指示该内部帧具有焦点。 当此方法将内部框架的状态从未选择更改为选定时,将触发InternalFrameEvent.INTERNAL_FRAME_ACTIVATED事件。 如果更改从选定到取消选择,则会触发InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED事件。- 参数
-
selected- 一个布尔值,其中true表示该内部框架应该被选中(当前处于活动状态),而false表示应该被取消选择 - 异常
-
PropertyVetoException- 当试图设置属性被否决的时候,JInternalFrame - 另请参见:
-
Component.isShowing(),InternalFrameEvent.INTERNAL_FRAME_ACTIVATED,InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED
-
isSelected
public boolean isSelected()
返回JInternalFrame是否是当前“选择”或活动帧。- 结果
-
true如果此内部框架当前被选中(有效) - 另请参见:
-
setSelected(boolean)
-
setFrameIcon
@BeanProperty(description="The icon shown in the top-left corner of this internal frame.") public void setFrameIcon(Icon icon)
设置要显示在该内部框架的标题栏中的图像(通常位于左上角)。 有些外观和感觉可能不支持在标题栏中显示图标。 此图像不是desktopIcon对象,这是JDesktop显示的图像,当此内部框架被图标化时。 传递null到此功能是有效的,但外观和感觉可以选择适合的行为,例如显示没有图标或默认图标的外观和感觉。- 参数
-
icon- 要显示在标题栏中的Icon - 另请参见:
-
getFrameIcon()
-
getFrameIcon
public Icon getFrameIcon()
返回显示在该内部框架的标题栏中的图像(通常位于左上角)。- 结果
-
标题栏中显示的是
Icon - 另请参见:
-
setFrameIcon(javax.swing.Icon)
-
moveToFront
public void moveToFront()
便利方法将该组件移动到位置0,如果其父级为JLayeredPane。
-
moveToBack
public void moveToBack()
便利方法将该组件移动到位置-1,如果其父对象是一个JLayeredPane。
-
getLastCursor
@BeanProperty(bound=false) public Cursor getLastCursor()
返回由setCursor方法设置的最后一个Cursor,该方法不是可调整大小的Cursor。- 结果
-
最后一个不可调整大小的
Cursor - 从以下版本开始:
- 1.6
-
setCursor
public void setCursor(Cursor cursor)
将光标图像设置为指定的光标。 当此组件的contains方法对当前光标位置返回true时,将显示此光标图像,此组件可见,可显示和启用。 设置Container的光标会导致该游标显示在所有容器的子组件中,但具有非null游标的游标除外。如果Java平台实现和/或本地系统不支持更改鼠标光标的形状,该方法可能没有视觉效果。
- 重写:
-
setCursor在Component - 参数
-
cursor- 由Cursor类定义的常量Cursor; 如果此参数为null则此组件将继承其父项的游标 - 从以下版本开始:
- 1.6
- 另请参见:
-
Component.isEnabled(),Component.isShowing(),Component.getCursor(),Component.contains(int, int),Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String),Cursor
-
setLayer
@BeanProperty(bound=false, expert=true, description="Specifies what desktop layer is used.") public void setLayer(Integer layer)
设置此组件的图层属性的便利方法。- 参数
-
layer- 一个Integer对象,指定此框架的桌面图层 - 异常
-
NullPointerException- 如果layer是null - 另请参见:
-
JLayeredPane
-
setLayer
@BeanProperty(bound=false, expert=true, description="Specifies what desktop layer is used.") public void setLayer(int layer)
设置此组件的图层属性的便利方法。 方法setLayer(Integer)应用于JLayeredPane预定义的层值。 当使用setLayer(int),必须注意不要意外与这些值冲突。- 参数
-
layer- 指定此内部框架的桌面层的整数 - 从以下版本开始:
- 1.3
- 另请参见:
-
setLayer(Integer),JLayeredPane
-
getLayer
public int getLayer()
获取此组件的图层属性的便捷方法。- 结果
-
一个
Integer对象,指定此框架的桌面图层 - 另请参见:
-
JLayeredPane
-
getDesktopPane
@BeanProperty(bound=false) public JDesktopPane getDesktopPane()
方便的方法搜索一个JDesktop实例的祖先层次结构。 如果JInternalFrame找不到,搜索到的是desktopIcon树。- 结果
-
所述
JDesktopPane此内部帧属于,或null如果没有找到
-
setDesktopIcon
@BeanProperty(description="The icon shown when this internal frame is minimized.") public void setDesktopIcon(JInternalFrame.JDesktopIcon d)
设置JDesktopIcon与此相关JInternalFrame。- 参数
-
d- 在JDesktopIcon上显示JDesktopIcon - 另请参见:
-
getDesktopIcon()
-
getDesktopIcon
public JInternalFrame.JDesktopIcon getDesktopIcon()
当这个JInternalFrame被图标化时,返回JDesktopIcon。- 结果
-
JDesktopIcon显示在桌面上 - 另请参见:
-
setDesktopIcon(javax.swing.JInternalFrame.JDesktopIcon)
-
getNormalBounds
public Rectangle getNormalBounds()
如果JInternalFrame未处于最大化状态,则返回getBounds(); 否则,返回JInternalFrame将被还原到的边界。- 结果
-
一个
Rectangle在正常状态下包含此帧的边界 - 从以下版本开始:
- 1.3
-
setNormalBounds
public void setNormalBounds(Rectangle r)
设置此内部框架的正常范围,该内部框架将从其最大化状态恢复到的边界。 此方法仅供桌面管理员使用。- 参数
-
r- 这个内部框架应该被恢复到的边界 - 从以下版本开始:
- 1.3
-
getFocusOwner
public Component getFocusOwner()
如果此JInternalFrame处于活动状态,则返回具有焦点的小孩。 否则返回null。- 结果
-
该组件与焦点,或
null如果没有孩子有焦点 - 从以下版本开始:
- 1.3
-
getMostRecentFocusOwner
@BeanProperty(bound=false) public Component getMostRecentFocusOwner()
返回此JInternalFrame的子组件,当选择此JInternalFrame时,该组件将接收焦点。 如果此JInternalFrame当前被选中,该方法返回与getFocusOwner方法相同的组件。 如果未选择此JInternalFrame,则将返回最近请求焦点的子组件。 如果没有子组件已经请求了焦点,则返回此JInternalFrame的初始可JInternalFrame组件。 如果没有这样的孩子存在,那么这个JInternalFrame的默认组件将被返回。- 结果
-
当选择此
JInternalFrame时将接收焦点的子组件 - 从以下版本开始:
- 1.4
- 另请参见:
-
getFocusOwner(),isSelected
-
restoreSubcomponentFocus
public void restoreSubcomponentFocus()
请求内部框架将焦点恢复到具有焦点的最后一个子组件。 用户在用户选择此内部框架时使用UI,例如,通过单击标题栏。- 从以下版本开始:
- 1.3
-
reshape
public void reshape(int x, int y, int width, int height)移动并调整此组件的大小。 与其他组件不同,此实现还强制重新布局,以便始终重新显示诸如标题栏的框架装饰。- 重写:
-
reshape在JComponent - 参数
-
x- 一个整数,给出组件的新水平位置,以其容器左侧的像素为单位 -
y- 一个整数,给出组件的新垂直位置,以其容器底部的像素为单位 -
width- 给出组件的新宽度(以像素为单位)的整数 -
height- 给出组件的新高度(以像素为单位)的整数 - 另请参见:
-
Component.setBounds(int, int, int, int)
-
addInternalFrameListener
public void addInternalFrameListener(InternalFrameListener l)
添加指定的侦听器以从该内部帧接收内部帧事件。- 参数
-
l- 内部框架监听器
-
removeInternalFrameListener
public void removeInternalFrameListener(InternalFrameListener l)
删除指定的内部帧监听器,使其不再从该内部帧接收内部帧事件。- 参数
-
l- 内部框架监听器
-
getInternalFrameListeners
@BeanProperty(bound=false) public InternalFrameListener[] getInternalFrameListeners()
返回所有InternalFrameListener的数组,并添加到JInternalFrame其中包含addInternalFrameListener。- 结果
-
所有添加的
InternalFrameListener或一个空数组,如果没有添加任何监听器 - 从以下版本开始:
- 1.4
- 另请参见:
-
addInternalFrameListener(javax.swing.event.InternalFrameListener)
-
fireInternalFrameEvent
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
-
-
doDefaultCloseAction
public void doDefaultCloseAction()
触发INTERNAL_FRAME_CLOSING事件,然后执行内部框架的默认关闭操作指定的操作。 该方法通常由内部框架的关闭按钮的外观实现的动作处理程序调用。- 从以下版本开始:
- 1.3
- 另请参见:
-
setDefaultCloseOperation(int),InternalFrameEvent.INTERNAL_FRAME_CLOSING
-
setDefaultCloseOperation
public void setDefaultCloseOperation(int operation)
设置用户在此内部框架上启动“关闭”时默认执行的操作。 可能的选择是:
-
DO_NOTHING_ON_CLOSE -
没做什么。
这要求程序在
internalFrameClosing方法中处理已注册的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
-
-
getDefaultCloseOperation
public int getDefaultCloseOperation()
返回用户在此内部框架上启动“关闭”时发生的默认操作。- 结果
- 当用户关闭内部框架时会发生的操作
- 另请参见:
-
setDefaultCloseOperation(int)
-
pack
public void pack()
导致此JInternalFrame子组件按其首选大小JInternalFrame。 图标化或最大化的内部框架首先被还原,然后打包。 如果内部框架无法恢复,则其状态不会更改,也不会被打包。- 另请参见:
-
Window.pack()
-
show
public void show()
如果内部框架不可见,将内部框架放在前面,使其可见,并尝试选择它。 内部框架第一次可见时,此方法也会触发INTERNAL_FRAME_OPENED事件。 如果内部框架已经可见,则此方法不起作用。 调用此方法与调用setVisible(true)具有相同的结果。
-
hide
public void hide()
描述从类复制:JComponent- 重写:
-
hide中的JComponent
-
dispose
public void dispose()
使此内部框架不可见,未选择并关闭。 如果框架尚未关闭,则此方法将触发INTERNAL_FRAME_CLOSED事件。 调用此方法的结果类似于setClosed(true),但是dispose总是成功关闭内部框架,并且不会触发INTERNAL_FRAME_CLOSING事件。
-
toFront
public void toFront()
将这个内部框架放在前面。 将此内部框架放置在堆叠顺序的顶部,并对其他可见的内部框架进行相应的调整。- 另请参见:
-
Window.toFront(),moveToFront()
-
toBack
public void toBack()
将这个内部框架发送到后面。 将此内部框架放置在堆叠顺序的底部,并对其他可见的内部框架进行相应的调整。- 另请参见:
-
Window.toBack(),moveToBack()
-
setFocusCycleRoot
public final void setFocusCycleRoot(boolean focusCycleRoot)
JInternalFrame因为JInternalFrame必须始终是焦点遍历循环的根。- 重写:
-
setFocusCycleRoot在Container - 参数
-
focusCycleRoot- 忽略此值 - 从以下版本开始:
- 1.4
- 另请参见:
-
isFocusCycleRoot(),Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy),Container.getFocusTraversalPolicy()
-
isFocusCycleRoot
public final boolean isFocusCycleRoot()
始终返回true因为所有JInternalFrame必须是焦点遍历循环的根。- 重写:
-
isFocusCycleRoot在Container - 结果
-
true - 从以下版本开始:
- 1.4
- 另请参见:
-
setFocusCycleRoot(boolean),Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy),Container.getFocusTraversalPolicy()
-
getFocusCycleRootAncestor
@BeanProperty(bound=false) public final Container getFocusCycleRootAncestor()
始终返回null因为JInternalFrame必须始终是焦点遍历循环的根。- 重写:
-
getFocusCycleRootAncestor在Component - 结果
-
null - 从以下版本开始:
- 1.4
- 另请参见:
-
Container.isFocusCycleRoot()
-
getWarningString
@BeanProperty(bound=false) public final String getWarningString()
获取与此内部框架一起显示的警告字符串。 由于内部框架始终是安全的(因为它完全包含在可能需要警告字符串的窗口中),因此此方法始终返回null。- 结果
-
null - 另请参见:
-
Window.getWarningString()
-
paramString
protected String paramString()
返回此JInternalFrame的字符串表示JInternalFrame。 该方法仅用于调试目的,并且返回的字符串的内容和格式可能因实现而异。 返回的字符串可能为空,但可能不是null。- 重写:
-
paramString在JComponent - 结果
-
这是
JInternalFrame的字符串表示JInternalFrame
-
paintComponent
protected void paintComponent(Graphics g)
被覆盖以允许在拖动内部框架时优化绘画。- 重写:
-
paintComponent在JComponent - 参数
-
g- 要保护的Graphics对象 - 另请参见:
-
JComponent.paint(java.awt.Graphics),ComponentUI
-
getAccessibleContext
@BeanProperty(bound=false) public AccessibleContext getAccessibleContext()
获取AccessibleContext与此JInternalFrame相关联。 对于内部框架,AccessibleContext采用AccessibleJInternalFrame对象的形式。 如有必要,将创建一个新的AccessibleJInternalFrame实例。- Specified by:
-
getAccessibleContext在接口Accessible - 重写:
-
getAccessibleContext在Component - 结果
-
一个
AccessibleJInternalFrame,作为这个AccessibleContext的JInternalFrame - 另请参见:
-
JInternalFrame.AccessibleJInternalFrame
-
-