Класс BasicInternalFrameTitlePane
- Все реализованные интерфейсы:
ImageObserver, MenuContainer, Serializable
- Прямые известные подклассы:
MetalInternalFrameTitlePane
public class BasicInternalFrameTitlePane extends JComponent
Предупреждение: Сериализованные объекты этого класса несовместимы с будущими выпусками Swing. Текущая поддержка сериализации подходит для краткосрочного хранения или RMI между приложениями, работающими с одной и той же версией Swing. Начиная с версии 1.4 поддержка долгосрочного хранения всех JavaBeans добавлена в пакет java.beans. См. XMLEncoder.
Краткое описание вложенных классов
| Модификатор и тип | Класс | Описание |
|---|---|---|
class |
BasicInternalFrameTitlePane.CloseAction |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.IconifyAction |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.MaximizeAction |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.MoveAction |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.PropertyChangeHandler |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.RestoreAction |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.SizeAction |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.SystemMenuBar |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
class |
BasicInternalFrameTitlePane.TitlePaneLayout |
Этот класс следует рассматривать как внутренний класс с модификатором доступа «protected». |
Вложенные классы/интерфейсы, объявленные в классе JComponent
JComponent.AccessibleJComponent
Вложенные классы/интерфейсы, объявленные в классе Container
Container.AccessibleAWTContainer
Вложенные классы/интерфейсы, объявленные в классе Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Краткое описание полей
| Модификатор и тип | Поле | Описание |
|---|---|---|
protected static final String |
CLOSE_CMD |
Свойство текста кнопки закрытия. |
protected Action |
closeAction |
Экземпляр CloseAction. |
protected JButton |
closeButton |
Кнопка закрытия. |
protected Icon |
closeIcon |
Значок закрытия. |
protected JInternalFrame |
frame |
Экземпляр JInternalFrame. |
protected JButton |
iconButton |
Кнопка сворачивания в значок. |
protected Icon |
iconIcon |
Значок сворачивания в значок. |
protected static final String |
ICONIFY_CMD |
Свойство текста кнопки сворачивания. |
protected Action |
iconifyAction |
Экземпляр IconifyAction. |
protected JButton |
maxButton |
Кнопка разворачивания. |
protected Icon |
maxIcon |
Значок разворачивания. |
protected static final String |
MAXIMIZE_CMD |
Свойство текста кнопки разворачивания. |
protected Action |
maximizeAction |
Экземпляр MaximizeAction. |
protected JMenuBar |
menuBar |
Экземпляр JMenuBar. |
protected Icon |
minIcon |
Значок сворачивания. |
protected static final String |
MOVE_CMD |
Свойство текста кнопки перемещения. |
protected Action |
moveAction |
Экземпляр MoveAction. |
protected Color |
notSelectedTextColor |
Цвет невыделенного текста. |
protected Color |
notSelectedTitleColor |
Цвет невыделенного заголовка. |
protected PropertyChangeListener |
propertyChangeListener |
Экземпляр PropertyChangeListener. |
protected static final String |
RESTORE_CMD |
Свойство текста кнопки восстановления. |
protected Action |
restoreAction |
Экземпляр RestoreAction. |
protected Color |
selectedTextColor |
Цвет выделенного текста. |
protected Color |
selectedTitleColor |
Цвет выделенного заголовка. |
protected static final String |
SIZE_CMD |
Свойство текста кнопки изменения размера. |
protected Action |
sizeAction |
Экземпляр SizeAction. |
protected JMenu |
windowMenu |
Экземпляр JMenu. |
Поля, объявленные в классе JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Поля, объявленные в классе Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Поля, объявленные в интерфейсе ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Краткое описание конструкторов
| Конструктор | Описание |
|---|---|
BasicInternalFrameTitlePane |
Создает новый экземпляр BasicInternalFrameTitlePane. |
Краткое описание методов
| Модификатор и тип | Метод | Описание |
|---|---|---|
protected void |
addSubComponents() |
Добавляет подкомпоненты. |
protected void |
addSystemMenuItems |
Добавляет элементы системного меню в systemMenu. |
protected void |
assembleSystemMenu() |
Собирает системное меню. |
protected void |
createActions() |
Создает действия. |
protected void |
createButtons() |
Создает кнопки. |
protected LayoutManager |
createLayout() |
Возвращает менеджер компоновки. |
protected PropertyChangeListener |
createPropertyChangeListener() |
Возвращает экземпляр PropertyChangeListener. |
protected JMenu |
createSystemMenu() |
Возвращает новый экземпляр JMenu. |
protected JMenuBar |
createSystemMenuBar() |
Возвращает новый экземпляр JMenuBar. |
protected void |
enableActions() |
Включает действия. |
protected String |
getTitle |
Возвращает заголовок. |
protected void |
installDefaults() |
Устанавливает свойства по умолчанию. |
protected void |
installListeners() |
Регистрирует прослушиватели. |
protected void |
installTitlePane() |
Устанавливает панель заголовка. |
void |
paintComponent |
Вызывает метод paint делегата пользовательского интерфейса, если делегат пользовательского интерфейса не равен null. |
protected void |
paintTitleBackground |
Вызывается из paintComponent. |
protected void |
postClosingEvent |
Отправляет кадру событие, аналогичное WINDOW_CLOSING, чтобы его можно было обработать как обычный Frame. |
protected void |
setButtonIcons() |
Устанавливает значки кнопок. |
protected void |
showSystemMenu() |
Отображает системное меню. |
protected void |
uninstallDefaults() |
Удаляет свойства по умолчанию. |
protected void |
uninstallListeners() |
Отменяет регистрацию прослушивателей. |
Методы, объявленные в классе JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, 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, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, 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, updateUI
Методы, объявленные в классе Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Методы, объявленные в классе 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, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, 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, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Подробное описание полей
iconButton
protected JButton iconButton
maxButton
protected JButton maxButton
closeButton
protected JButton closeButton
windowMenu
protected JMenu windowMenu
JMenu.frame
protected JInternalFrame frame
JInternalFrame.selectedTitleColor
protected Color selectedTitleColor
selectedTextColor
protected Color selectedTextColor
notSelectedTitleColor
protected Color notSelectedTitleColor
notSelectedTextColor
protected Color notSelectedTextColor
maxIcon
protected Icon maxIcon
minIcon
protected Icon minIcon
iconIcon
protected Icon iconIcon
closeIcon
protected Icon closeIcon
propertyChangeListener
protected PropertyChangeListener propertyChangeListener
PropertyChangeListener.closeAction
protected Action closeAction
CloseAction.maximizeAction
protected Action maximizeAction
MaximizeAction.iconifyAction
protected Action iconifyAction
IconifyAction.restoreAction
protected Action restoreAction
RestoreAction.moveAction
protected Action moveAction
MoveAction.sizeAction
protected Action sizeAction
SizeAction.CLOSE_CMD
protected static final String CLOSE_CMD
ICONIFY_CMD
protected static final String ICONIFY_CMD
RESTORE_CMD
protected static final String RESTORE_CMD
MAXIMIZE_CMD
protected static final String MAXIMIZE_CMD
MOVE_CMD
protected static final String MOVE_CMD
SIZE_CMD
protected static final String SIZE_CMD
Подробное описание конструкторов
BasicInternalFrameTitlePane
public BasicInternalFrameTitlePane(JInternalFrame f)
BasicInternalFrameTitlePane.- Параметры:
-
f— экземплярJInternalFrame
Подробное описание методов
installTitlePane
protected void installTitlePane()
addSubComponents
protected void addSubComponents()
createActions
protected void createActions()
installListeners
protected void installListeners()
uninstallListeners
protected void uninstallListeners()
installDefaults
protected void installDefaults()
uninstallDefaults
protected void uninstallDefaults()
createButtons
protected void createButtons()
setButtonIcons
protected void setButtonIcons()
assembleSystemMenu
protected void assembleSystemMenu()
addSystemMenuItems
protected void addSystemMenuItems(JMenu systemMenu)
systemMenu.- Параметры:
-
systemMenu— экземплярJMenu
createSystemMenu
protected JMenu createSystemMenu()
JMenu.- Возвращает:
- новый экземпляр
JMenu
createSystemMenuBar
protected JMenuBar createSystemMenuBar()
JMenuBar.- Возвращает:
- новый экземпляр
JMenuBar
showSystemMenu
protected void showSystemMenu()
paintComponent
public void paintComponent(Graphics g)
JComponentnull. Делегату передается копия объекта Graphics, чтобы защитить остальную часть кода отрисовки от необратимых изменений (например, Graphics.translate). При переопределении этого метода в подклассе не следует вносить постоянные изменения в переданный объект Graphics. Например, не следует изменять Rectangle отсечения или преобразование. Если необходимо выполнить эти операции, может быть удобнее создать новый Graphics на основе переданного Graphics и изменить его. Кроме того, если вы не вызываете реализацию суперкласса, необходимо учитывать свойство opaque: если этот компонент непрозрачен, следует полностью заполнить фон непрозрачным цветом. Если свойство opaque не учитывать, могут появиться визуальные артефакты.
Для переданного объекта Graphics может быть установлено преобразование, отличное от тождественного. В этом случае при последовательном применении еще одного преобразования могут возникнуть неожиданные результаты.
- Переопределяет:
-
paintComponentв классеJComponent - Параметры:
-
g— объектGraphics, который нужно защитить - См. также:
paintTitleBackground
protected void paintTitleBackground(Graphics g)
- Параметры:
-
g— графический контекст для отрисовки фона - Начиная с версии:
- 1.4
getTitle
protected String getTitle(String text, FontMetrics fm, int availTextWidth)
- Параметры:
-
text— текст -
fm— экземплярFontMetrics -
availTextWidth— доступная ширина текста - Возвращает:
- заголовок.
postClosingEvent
protected void postClosingEvent(JInternalFrame frame)
Frame.- Параметры:
-
frame— экземплярJInternalFrame
enableActions
protected void enableActions()
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
PropertyChangeListener.- Возвращает:
- экземпляр
PropertyChangeListener
createLayout
protected LayoutManager createLayout()
- Возвращает:
- менеджер компоновки
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/javax/swing/plaf/basic/BasicInternalFrameTitlePane.html