public class SynthMenuUI extends BasicMenuUI implements PropertyChangeListener, SynthUI
JMenuのSynth L&F UI委譲を提供します。BasicMenuUI.ChangeHandler, BasicMenuUI.MouseInputHandlerchangeListener, menuListeneracceleratorDelimiter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, propertyChangeListener, selectionBackground, selectionForegroundDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| コンストラクタ | 説明 |
|---|---|
SynthMenuUI() |
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
static ComponentUI |
createUI(JComponent x) |
指定されたコンポーネントの新しいUIオブジェクトを作成します。
|
SynthContext |
getContext(JComponent c) |
指定されたコンポーネントのコンテキストを返します。
|
protected Dimension |
getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) |
|
protected void |
installDefaults() |
|
protected void |
installListeners() |
|
void |
paint(Graphics g, JComponent c) |
Look & Feelに従って、指定されたコンポーネントをペイントします。
|
protected void |
paint(SynthContext context, Graphics g) |
指定されたコンポーネントをペイントします。
|
void |
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) |
ボーダーをペイントします。
|
void |
propertyChange(PropertyChangeEvent e) |
バウンド・プロパティの変更時に呼び出されます。
|
protected void |
uninstallDefaults() |
|
protected void |
uninstallListeners() |
|
void |
uninstallUI(JComponent c) |
installUI時に、指定されたコンポーネントに対して行われた構成を取り消します。 |
void |
update(Graphics g, JComponent c) |
このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。
|
createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createMouseInputListener, createPropertyChangeListener, getMaximumSize, getPropertyPrefix, installKeyboardActions, setupPostTimer, uninstallKeyboardActionsdoClick, getMinimumSize, getPath, getPreferredSize, installComponents, installUI, paintBackground, paintMenuItem, paintText, uninstallComponentscontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehaviorpublic static ComponentUI createUI(JComponent x)
x - UIオブジェクトを作成するコンポーネントprotected void installDefaults()
installDefaults、クラスBasicMenuUIprotected void installListeners()
installListeners、クラスBasicMenuUIpublic void uninstallUI(JComponent c)
installUI時に、指定されたコンポーネントに対して行われた構成を取り消します。 このメソッドは、このUIComponentインスタンスが、指定されたコンポーネントのUI委譲として削除されているときに呼び出されます。 このメソッドは、installUIによって実行された構成を元に戻すべきです。この場合、JComponentインスタンスをクリーンな状態(余分なリスナーや、Look & Feel固有のプロパティ・オブジェクトが残らないように)にするよう十分注意してください。 手順には次のものが含まれるべきです。
uninstallUI、クラスBasicMenuItemUIc - このUI委譲が削除されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()protected void uninstallDefaults()
uninstallDefaults、クラスBasicMenuUIprotected void uninstallListeners()
uninstallListeners、クラスBasicMenuUIpublic SynthContext getContext(JComponent c)
getContext、インタフェースSynthUIc - SynthContextを要求するコンポーネント。protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
getPreferredMenuItemSize、クラスBasicMenuItemUIpublic void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)メソッドを呼び出します。
一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードをpaintメソッドに入れるようにしてください。
update、クラスBasicMenuItemUIg - ペイントに使用されるGraphicsオブジェクトc - ペイントされるコンポーネントpaint(SynthContext,Graphics)public void paint(Graphics g, JComponent c)
このメソッドは、Synth Look & Feelで使用されません。 ペイントはpaint(SynthContext,Graphics)メソッドによって処理されます。
paint、クラスBasicMenuItemUIg - ペイントに使用されるGraphicsオブジェクトc - ペイントされるコンポーネントpaint(SynthContext,Graphics)protected void paint(SynthContext context, Graphics g)
context - ペイントされるコンポーネントのコンテキストg - ペイントに使用されるGraphicsオブジェクトupdate(Graphics,JComponent)public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
paintBorder、インタフェースSynthUIcontext - コンポーネント・コンテキストg - ペイントされるGraphicsx - X座標y - Y座標w - ボーダーの幅h - ボーダーの高さpublic void propertyChange(PropertyChangeEvent e)
propertyChange、インタフェースPropertyChangeListenere - イベント・ソースと変更されたプロパティを記述したPropertyChangeEventオブジェクト。 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。