Класс BasicInternalFrameTitlePane
- Все реализуемые интерфейсы:
-
ImageObserver,MenuContainer,Serializable
- Прямые известные подклассы:
MetalInternalFrameTitlePane
public class BasicInternalFrameTitlePane extends JComponent
Предупреждение: Сериализованные объекты этого класса не будут совместимы с будущими выпусками Swing. Текущая поддержка сериализации подходит для краткосрочного хранения или RMI между приложениями, использующими одну и ту же версию Swing. Начиная с версии 1.4, добавлена поддержка долгосрочного хранения всех JavaBeans в пакете java.beans. См. XMLEncoder.
Краткое описание вложенных классов
| Модификатор и тип | Класс | Описание |
|---|---|---|
class |
BasicInternalFrameTitlePane.CloseAction |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.IconifyAction |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.MaximizeAction |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.MoveAction |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.PropertyChangeHandler |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.RestoreAction |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.SizeAction |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.SystemMenuBar |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
class |
BasicInternalFrameTitlePane.TitlePaneLayout |
Этот класс следует рассматривать как "защищённый" внутренний класс. |
Вложенные классы/интерфейсы, объявленные в классе javax.swing.JComponent
JComponent.AccessibleJComponent
Вложенные классы/интерфейсы, объявленные в классе java.awt.Container
Container.AccessibleAWTContainer
Вложенные классы/интерфейсы, объявленные в классе java.awt.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. |
Поля, объявленные в классе javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Поля, объявленные в классе java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Поля, объявленные в интерфейсе java.awt.image.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() |
Отменяет регистрацию слушателей. |
Методы, объявленные в классе javax.swing.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
Методы, объявленные в классе java.awt.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
Методы, объявленные в классе 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, 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 и манипулировать им. Кроме того, если вы не вызываете реализацию суперкласса, вы должны соблюдать свойство непрозрачности; то есть, если этот компонент непрозрачен, вы должны полностью заполнить фон непрозрачным цветом. Если вы не соблюдаете свойство непрозрачности, вы, скорее всего, увидите визуальные артефакты.
Переданный объект 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, 2021, 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/17/docs/api/java.desktop/javax/swing/plaf/basic/BasicInternalFrameTitlePane.html