public class SynthSliderUI extends BasicSliderUI implements PropertyChangeListener, SynthUI
JSliderのSynth L&F UIの委譲を提供します。BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListenerchangeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRectDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| 修飾子 | コンストラクタ | 説明 |
|---|---|---|
protected |
SynthSliderUI(JSlider c) |
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
protected void |
calculateGeometry() |
|
protected void |
calculateThumbLocation() |
|
protected BasicSliderUI.TrackListener |
createTrackListener(JSlider s) |
|
static ComponentUI |
createUI(JComponent c) |
指定されたコンポーネントの新しいUIオブジェクトを作成します。
|
int |
getBaseline(JComponent c, int width, int height) |
ベースラインを返します。
|
SynthContext |
getContext(JComponent c) |
指定されたコンポーネントのコンテキストを返します。
|
Dimension |
getMinimumSize(JComponent c) |
指定されたコンポーネントの、Look & Feelに適した最小サイズを返します。
|
Dimension |
getPreferredSize(JComponent c) |
指定されたコンポーネントの、Look & Feelに適した推奨サイズを返します。
|
protected Dimension |
getThumbSize() |
|
protected void |
installDefaults(JSlider slider) |
|
protected void |
installListeners(JSlider slider) |
|
protected void |
layout() |
スライダを配置します。
|
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 |
recalculateIfInsetsChanged() |
|
void |
setThumbLocation(int x, int y) |
|
protected void |
uninstallDefaults(JSlider slider) |
デフォルトの設定をアンインストールします。
|
protected void |
uninstallListeners(JSlider slider) |
|
void |
update(Graphics g, JComponent c) |
このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。
|
int |
valueForXPosition(int xPos) |
x位置の値を返します。
|
int |
valueForYPosition(int yPos) |
y位置の値を返します。
|
protected int |
xPositionForValue(int value) |
|
protected int |
yPositionForValue(int value, int trackY, int trackHeight) |
指定された値のyの位置を返します。
|
calculateContentRect, calculateFocusRect, calculateLabelRect, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createPropertyChangeListener, createScrollListener, drawInverted, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredVerticalSize, getShadowColor, getTickLength, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installKeyboardActions, installUI, isDragging, labelsHaveSameBaselines, paintFocus, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintThumb, paintTicks, paintTrack, paintVerticalLabel, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, uninstallKeyboardActions, uninstallUI, yPositionForValuecontains, getAccessibleChild, getAccessibleChildrenCountprotected SynthSliderUI(JSlider c)
public static ComponentUI createUI(JComponent c)
c - UIオブジェクトを作成するコンポーネントprotected void installDefaults(JSlider slider)
installDefaults、クラスBasicSliderUIprotected void uninstallDefaults(JSlider slider)
LookAndFeelのアンインストール時に呼び出されます。 uninstallDefaults、クラスBasicSliderUIprotected void installListeners(JSlider slider)
installListeners、クラスBasicSliderUIprotected void uninstallListeners(JSlider slider)
uninstallListeners、クラスBasicSliderUIprotected BasicSliderUI.TrackListener createTrackListener(JSlider s)
createTrackListener、クラスBasicSliderUIpublic int getBaseline(JComponent c, int width, int height)
getBaseline、クラスBasicSliderUIc - ベースラインが要求されるJComponentwidth - ベースラインを取得する幅height - ベースラインを取得する高さJComponent.getBaseline(int, int)public Dimension getPreferredSize(JComponent c)
nullが返された場合、適切なサイズは代わりにコンポーネントのレイアウト・マネージャによって計算されます(これは、特定のレイアウト・マネージャをインストールしてあるコンポーネントの場合に推奨する方法です)。 このメソッドのデフォルト実装はnullを返します。 getPreferredSize、クラスBasicSliderUIc - 適切なサイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるJComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)public Dimension getMinimumSize(JComponent c)
nullが返された場合、最小サイズは代わりにコンポーネントのレイアウト・マネージャによって計算されます(これは、特定のレイアウト・マネージャをインストールしてあるコンポーネントの場合に推奨する方法です)。 このメソッドのデフォルト実装はgetPreferredSizeを呼び出して、その値を返します。 getMinimumSize、クラスBasicSliderUIc - 最小サイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるDimensionオブジェクトまたはnullJComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)protected void calculateGeometry()
calculateGeometry、クラスBasicSliderUIprotected void layout()
protected void calculateThumbLocation()
calculateThumbLocation、クラスBasicSliderUIpublic void setThumbLocation(int x,
int y)
setThumbLocation、クラスBasicSliderUIprotected int xPositionForValue(int value)
xPositionForValue、クラスBasicSliderUIprotected int yPositionForValue(int value,
int trackY,
int trackHeight)
trackHeightが負の数だった場合の結果は保証されません。 yPositionForValue、クラスBasicSliderUIvalue - 位置を取得するスライダ値trackY - トラックのy原点trackHeight - トラックの高さpublic int valueForYPosition(int yPos)
yPosが下端または上端のトラックを越えている場合、このメソッドはスライダが反転しているかどうかに応じて、スライダの最小値または最大値に値を設定します。 valueForYPosition、クラスBasicSliderUIpublic int valueForXPosition(int xPos)
xPosが左端または右端のトラックを越えている場合、このメソッドはスライダが反転しているかどうかに応じて、スライダの最小値または最大値に値を設定します。 valueForXPosition、クラスBasicSliderUIprotected Dimension getThumbSize()
getThumbSize、クラスBasicSliderUIprotected void recalculateIfInsetsChanged()
recalculateIfInsetsChanged、クラスBasicSliderUIpublic SynthContext getContext(JComponent c)
getContext、インタフェースSynthUIc - SynthContextを要求するコンポーネント。public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)メソッドを呼び出します。
一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードをpaintメソッドに入れるようにしてください。
update、クラスComponentUIg - ペイントに使用されるGraphicsオブジェクトc - ペイントされるコンポーネントpaint(SynthContext,Graphics)public void paint(Graphics g, JComponent c)
このメソッドは、Synth Look & Feelで使用されません。 ペイントはpaint(SynthContext,Graphics)メソッドによって処理されます。
paint、クラスBasicSliderUIg - ペイントに使用される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 - ボーダーの高さprotected void paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds)
context - ペイントされるコンポーネントのコンテキストg - ペイントに使用されるGraphicsオブジェクトthumbBounds - サムのバウンディング・ボックスprotected void paintTrack(SynthContext context, Graphics g, Rectangle trackBounds)
context - ペイントされるコンポーネントのコンテキストg - ペイントに使用されるGraphicsオブジェクトtrackBounds - トラックのバウンディング・ボックス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も参照してください。