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に適しています。 1.4では、すべてのJavaBeansの長期ストレージのサポートがjava.beans
パッケージに追加されました。 XMLEncoder
を参照してください。
-
ネストされたクラスのサマリー
修飾子と型クラス説明class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。class
このクラスは、「protected」内部クラスとして扱うようにしてください。クラス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
閉じるボタンのテキスト・プロパティ。protected Action
CloseAction
のインスタンス。protected JButton
「閉じる」ボタン。protected Icon
閉じるアイコン。protected JInternalFrame
JInternalFrame
のインスタンス。protected JButton
アイコン化ボタン。protected Icon
アイコン化アイコン。protected static final String
最小化ボタン・テキスト・プロパティ。protected Action
IconifyAction
のインスタンス。protected JButton
「最大化」ボタン。protected Icon
最大化アイコン。protected static final String
最大化ボタン・テキスト・プロパティ。protected Action
MaximizeAction
のインスタンス。protected JMenuBar
JMenuBar
のインスタンス。protected Icon
最小化アイコン。protected static final String
移動ボタン・テキスト・プロパティ。protected Action
MoveAction
のインスタンス。protected Color
選択されていないテキストの色。protected Color
選択されていないタイトルの色。protected PropertyChangeListener
PropertyChangeListener
のインスタンス。protected static final String
リストア・ボタンのテキスト・プロパティ。protected Action
RestoreAction
のインスタンス。protected Color
選択したテキストの色。protected Color
選択したタイトルの色。protected static final String
サイズ・ボタンのテキスト・プロパティ。protected Action
SizeAction
のインスタンス。protected JMenu
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
の新しいインスタンスを構築します。 -
メソッドのサマリー
修飾子と型メソッド説明protected void
サブコンポーネントを追加します。protected void
addSystemMenuItems
(JMenu systemMenu) systemMenu
にシステム・メニュー項目を追加します。protected void
システム・メニューを組み立てます。protected void
アクションを作成します。protected void
ボタンを作成します。protected LayoutManager
レイアウト・マネージャを返します。protected PropertyChangeListener
PropertyChangeListener
のインスタンスを返します。protected JMenu
JMenu
の新しいインスタンスを返します。protected JMenuBar
JMenuBar
の新しいインスタンスを返します。protected void
アクションを有効にします。protected String
getTitle
(String text, FontMetrics fm, int availTextWidth) タイトルを返します。protected void
デフォルトのプロパティをインストールします。protected void
リスナーを登録します。protected void
タイトル・ペインをインストールします。void
UI委譲がnull
でない場合に、UI委譲のペイント・メソッドを呼び出します。protected void
paintComponentから呼び出されます。protected void
postClosingEvent
(JInternalFrame frame) 通常のFrame
のように処理できるように、WINDOW_CLOSINGのようなイベントをフレームにポストします。protected void
ボタン・アイコンを設定します。protected void
システム・メニューを表示します。protected void
既定のプロパティをアンインストールします。protected void
リスナーを登録解除します。クラス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 windowMenuJMenu
のインスタンス。 -
frame
protected JInternalFrame frameJInternalFrame
のインスタンス。 -
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 propertyChangeListenerPropertyChangeListener
のインスタンス。 -
closeAction
protected Action closeActionCloseAction
のインスタンス。 -
maximizeAction
protected Action maximizeActionMaximizeAction
のインスタンス。 -
iconifyAction
protected Action iconifyActionIconifyAction
のインスタンス。 -
restoreAction
protected Action restoreActionRestoreAction
のインスタンス。 -
moveAction
protected Action moveActionMoveAction
のインスタンス。 -
sizeAction
protected Action sizeActionSizeAction
のインスタンス。 -
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
-
createSystemMenuBar
-
showSystemMenu
protected void showSystemMenu()システム・メニューを表示します。 -
paintComponent
public void paintComponent(Graphics g) 次のクラスからコピーされた説明:JComponent
UI委譲がnull
でない場合に、UI委譲のペイント・メソッドを呼び出します。 委譲にはGraphics
オブジェクトのコピーを渡し、残りのペイント・コードに対して取消しできない変更が行われないように保護します(たとえばGraphics.translate
など)。このメソッドをサブクラスでオーバーライドする場合は、渡された
Graphics
に永続的な変更を行わないようにしてください。 たとえば、クリップRectangle
を変更したり、変換を変更したりするべきではありません。 このような操作が必要な場合は、渡されたGraphics
から新しいGraphics
を作成し、それを操作するほうが容易でしょう。 さらに、superの実装を起動しない場合は、不透明なプロパティに従う必要があります。つまり、このコンポーネントが不透明な場合は、バックグラウンドを不透明な色で完全に入力する必要があります。 不透明プロパティを尊重しない場合は、視覚的なアーティファクトが見える場合があります。渡される
Graphics
オブジェクトが、インストールされている恒等変換でない変換を持っている場合があります。 この場合、別の変換を累積的に適用すると、予期しない結果が生じる場合があります。- オーバーライド:
paintComponent
、クラスJComponent
- パラメータ:
g
- 保護対象のGraphics
オブジェクト- 関連項目:
-
paintTitleBackground
protected void paintTitleBackground(Graphics g) paintComponentから呼び出されます。 タイトル・ペインのバックグラウンドをペイントします。 すると、すべてのテキストとアイコンがこのバックグラウンドの上にレンダリングされることになります。- パラメータ:
g
- バックグラウンドをレンダリングするために使用されるグラフィックス- 導入されたバージョン:
- 1.4
-
getTitle
protected String getTitle(String text, FontMetrics fm, int availTextWidth) タイトルを返します。- パラメータ:
text
- テキストfm
-FontMetrics
のインスタンスavailTextWidth
- 使用可能なテキストの幅- 戻り値:
- タイトル。
-
postClosingEvent
protected void postClosingEvent(JInternalFrame frame) 通常のFrame
のように処理できるように、WINDOW_CLOSINGのようなイベントをフレームにポストします。- パラメータ:
frame
-JInternalFrame
のインスタンス
-
enableActions
protected void enableActions()アクションを有効にします。 -
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()PropertyChangeListener
のインスタンスを返します。- 戻り値:
PropertyChangeListener
のインスタンス
-
createLayout
-