JavaTM Platform
Standard Ed. 6

javax.swing.plaf.basic
クラス BasicInternalFrameTitlePane

java.lang.Object
  上位を拡張 java.awt.Component
      上位を拡張 java.awt.Container
          上位を拡張 javax.swing.JComponent
              上位を拡張 javax.swing.plaf.basic.BasicInternalFrameTitlePane
すべての実装されたインタフェース:
ImageObserver, MenuContainer, Serializable
直系の既知のサブクラス:
MetalInternalFrameTitlePane

public class BasicInternalFrameTitlePane
extends JComponent

基本のタイトルバーを管理するクラスです。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。JDK Version 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」内部クラスとして扱うことをお勧めします。
 
クラス javax.swing.JComponent から継承された入れ子のクラス/インタフェース
JComponent.AccessibleJComponent
 
クラス java.awt.Container から継承された入れ子のクラス/インタフェース
Container.AccessibleAWTContainer
 
クラス java.awt.Component から継承された入れ子のクラス/インタフェース
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
フィールドの概要
protected static String CLOSE_CMD
           
protected  Action closeAction
           
protected  JButton closeButton
           
protected  Icon closeIcon
           
protected  JInternalFrame frame
           
protected  JButton iconButton
           
protected  Icon iconIcon
           
protected static String ICONIFY_CMD
           
protected  Action iconifyAction
           
protected  JButton maxButton
           
protected  Icon maxIcon
           
protected static String MAXIMIZE_CMD
           
protected  Action maximizeAction
           
protected  JMenuBar menuBar
           
protected  Icon minIcon
           
protected static String MOVE_CMD
           
protected  Action moveAction
           
protected  Color notSelectedTextColor
           
protected  Color notSelectedTitleColor
           
protected  PropertyChangeListener propertyChangeListener
           
protected static String RESTORE_CMD
           
protected  Action restoreAction
           
protected  Color selectedTextColor
           
protected  Color selectedTitleColor
           
protected static String SIZE_CMD
           
protected  Action sizeAction
           
protected  JMenu windowMenu
           
 
クラス javax.swing.JComponent から継承されたフィールド
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
クラス java.awt.Component から継承されたフィールド
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
インタフェース java.awt.image.ImageObserver から継承されたフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
コンストラクタの概要
BasicInternalFrameTitlePane(JInternalFrame f)
           
 
メソッドの概要
protected  void addSubComponents()
           
protected  void addSystemMenuItems(JMenu systemMenu)
           
protected  void assembleSystemMenu()
           
protected  void createActions()
           
protected  void createButtons()
           
protected  LayoutManager createLayout()
           
protected  PropertyChangeListener createPropertyChangeListener()
           
protected  JMenu createSystemMenu()
           
protected  JMenuBar createSystemMenuBar()
           
protected  void enableActions()
           
protected  String getTitle(String text, FontMetrics fm, int availTextWidth)
           
protected  void installDefaults()
           
protected  void installListeners()
           
protected  void installTitlePane()
           
 void paintComponent(Graphics g)
          UI 委譲が null でない場合に、UI 委譲のペイントメソッドを呼び出します。
protected  void paintTitleBackground(Graphics g)
          paintComponent から呼び出します。
protected  void postClosingEvent(JInternalFrame frame)
          通常の Frame と同様に処理できるように、フレームに WINDOW_CLOSING と同様なイベントを転送します。
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, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, transferFocusBackward, 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, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

menuBar

protected JMenuBar menuBar

iconButton

protected JButton iconButton

maxButton

protected JButton maxButton

closeButton

protected JButton closeButton

windowMenu

protected JMenu windowMenu

frame

protected JInternalFrame frame

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

closeAction

protected Action closeAction

maximizeAction

protected Action maximizeAction

iconifyAction

protected Action iconifyAction

restoreAction

protected Action restoreAction

moveAction

protected Action moveAction

sizeAction

protected Action 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)
メソッドの詳細

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)

createSystemMenu

protected JMenu createSystemMenu()

createSystemMenuBar

protected JMenuBar createSystemMenuBar()

showSystemMenu

protected void showSystemMenu()

paintComponent

public void paintComponent(Graphics g)
クラス JComponent の記述:
UI 委譲が null でない場合に、UI 委譲のペイントメソッドを呼び出します。委譲には Graphics オブジェクトのコピーを渡し、残りのペイントコードに対して取り消しできない変更が行われないように保護します (たとえば Graphics.translate など)。  

このメソッドをサブクラスでオーバーライドする場合は、渡された Graphics のオブジェクトには永続的な変更は行わないようにします。たとえば Rectangle クリップや変換は変更しません。このような変更が必要な場合は、渡された Graphics から新しい Graphics を生成し、それを変更するほうが容易です。さらに上位オブジェクトの実装を行わない場合は、不透明プロパティーに注意する必要があります。つまりこのコンポーネントが不透明な場合は、バックグラウンドには不透明でない色を使用する必要があります。不透明プロパティーを無視すると画面が見にくくなります。  

渡された Graphics オブジェクトには、インストールされている変換以外の変換が含まれていることがあります。この場合、ほかの変換を累積的に適用すると、予期しない結果が生じる可能性があります。

オーバーライド:
クラス JComponent 内の paintComponent
パラメータ:
g - 保護対象の Graphics オブジェクト
関連項目:
JComponent.paint(java.awt.Graphics), ComponentUI

paintTitleBackground

protected void paintTitleBackground(Graphics g)
paintComponent から呼び出します。タイトル区画のバックグラウンドをペイントします。すべてのテキストとアイコンは、このバックグラウンドの上に描画されます。

パラメータ:
g - バックグラウンドを描画するために使用されるグラフィックス
導入されたバージョン:
1.4

getTitle

protected String getTitle(String text,
                          FontMetrics fm,
                          int availTextWidth)

postClosingEvent

protected void postClosingEvent(JInternalFrame frame)
通常の Frame と同様に処理できるように、フレームに WINDOW_CLOSING と同様なイベントを転送します。


enableActions

protected void enableActions()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

createLayout

protected LayoutManager createLayout()

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。