public class SynthScrollBarUI extends BasicScrollBarUI implements PropertyChangeListener, SynthUI
JScrollBar
のSynth L&F UI委譲を提供します。BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
buttonListener, decrButton, DECREASE_HIGHLIGHT, decrGap, incrButton, INCREASE_HIGHLIGHT, incrGap, isDragging, maximumThumbSize, minimumThumbSize, modelListener, NO_HIGHLIGHT, propertyChangeListener, scrollbar, scrollBarWidth, scrollListener, scrollTimer, thumbColor, thumbDarkShadowColor, thumbHighlightColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
コンストラクタ | 説明 |
---|---|
SynthScrollBarUI() |
修飾子と型 | メソッド | 説明 |
---|---|---|
protected void |
configureScrollBarColors() |
|
protected JButton |
createDecreaseButton(int orientation) |
|
protected JButton |
createIncreaseButton(int orientation) |
|
static ComponentUI |
createUI(JComponent c) |
|
SynthContext |
getContext(JComponent c) |
指定されたコンポーネントのコンテキストを返します。
|
protected Dimension |
getMinimumThumbSize() |
つまみに許容される最小のサイズを返します。
|
Dimension |
getPreferredSize(JComponent c) |
垂直スクロール・バーの推奨幅は、増分ボタンと減分ボタン(
null 以外)の推奨幅の最大値、およびつまみの最小幅です。 |
boolean |
getSupportsAbsolutePositioning() |
ユーザーがマウス・ジェスチャ(通常はマウスの中央ボタン)を使ってつまみを絶対位置指定できるかどうかを示します。
|
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) |
ボーダーをペイントします。
|
protected void |
paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds) |
スクロール・バーのつまみをペイントします。
|
protected void |
paintTrack(SynthContext context, Graphics g, Rectangle trackBounds) |
スクロール・バーのトラックをペイントします。
|
void |
propertyChange(PropertyChangeEvent e) |
バウンド・プロパティの変更時に呼び出されます。
|
protected void |
setThumbRollover(boolean active) |
マウスが現在つまみの上にあるかどうかを設定します。
|
protected void |
uninstallDefaults() |
|
protected void |
uninstallListeners() |
|
void |
update(Graphics g, JComponent c) |
このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。
|
addLayoutComponent, createArrowButtonListener, createModelListener, createPropertyChangeListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, paintThumb, paintTrack, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbBounds, uninstallComponents, uninstallKeyboardActions, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize
public static ComponentUI createUI(JComponent c)
protected void installDefaults()
installDefaults
、クラスBasicScrollBarUI
protected void configureScrollBarColors()
configureScrollBarColors
、クラスBasicScrollBarUI
protected void installListeners()
installListeners
、クラスBasicScrollBarUI
protected void uninstallListeners()
uninstallListeners
、クラスBasicScrollBarUI
protected void uninstallDefaults()
uninstallDefaults
、クラスBasicScrollBarUI
public SynthContext getContext(JComponent c)
getContext
、インタフェースSynthUI
c
- SynthContextを要求するコンポーネント。public boolean getSupportsAbsolutePositioning()
getSupportsAbsolutePositioning
、クラスBasicScrollBarUI
public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)
メソッドを呼び出します。
一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードをpaint
メソッドに入れるようにしてください。
update
、クラスComponentUI
g
- ペイントに使用されるGraphics
オブジェクトc
- ペイントされるコンポーネントpaint(SynthContext,Graphics)
public void paint(Graphics g, JComponent c)
このメソッドは、Synth Look & Feelで使用されません。 ペイントはpaint(SynthContext,Graphics)
メソッドによって処理されます。
paint
、クラスBasicScrollBarUI
g
- ペイントに使用される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
、インタフェースSynthUI
context
- コンポーネント・コンテキストg
- ペイントされるGraphics
x
- X座標y
- Y座標w
- ボーダーの幅h
- ボーダーの高さprotected void paintTrack(SynthContext context, Graphics g, Rectangle trackBounds)
context
- ペイントされるコンポーネントのコンテキストg
- ペイントに使用されるGraphics
オブジェクトtrackBounds
- トラックのバウンディング・ボックスprotected void paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds)
context
- ペイントされるコンポーネントのコンテキストg
- ペイントに使用されるGraphics
オブジェクトthumbBounds
- サムのバウンディング・ボックスpublic Dimension getPreferredSize(JComponent c)
null
以外)の推奨幅の最大値、およびつまみの最小幅です。 推奨される高さは、同じ部分の推奨される高さの総計です。 水平スクロール・バーの推奨されるサイズの原理も同様です。
preferredSize
は1回だけ計算されます。以後、このメソッドを呼び出すと、キャッシュに格納されたサイズ値が返されます。
getPreferredSize
、クラスBasicScrollBarUI
c
- このメソッドを委譲しているJScrollBar
BasicScrollBarUI.getMaximumSize(javax.swing.JComponent)
, ComponentUI.getMinimumSize(javax.swing.JComponent)
protected Dimension getMinimumThumbSize()
警告: このメソッドが返す値は変更しないでください。これは共有される静的定数です。
getMinimumThumbSize
、クラスBasicScrollBarUI
BasicScrollBarUI.getMaximumThumbSize()
protected JButton createDecreaseButton(int orientation)
createDecreaseButton
、クラスBasicScrollBarUI
protected JButton createIncreaseButton(int orientation)
createIncreaseButton
、クラスBasicScrollBarUI
protected void setThumbRollover(boolean active)
setThumbRollover
、クラスBasicScrollBarUI
active
- trueは、つまみが現在アクティブであることを示します。public void propertyChange(PropertyChangeEvent e)
PropertyChangeListener
propertyChange
、インタフェースPropertyChangeListener
e
- イベント・ソースと変更されたプロパティを記述したPropertyChangeEventオブジェクト。 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。