- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.SliderUI
-
- javax.swing.plaf.basic.BasicSliderUI
-
- javax.swing.plaf.synth.SynthSliderUI
-
- すべての実装されたインタフェース:
PropertyChangeListener
,EventListener
,SynthConstants
,SynthUI
public class SynthSliderUI extends BasicSliderUI implements PropertyChangeListener, SynthUI
JSlider
のSynth L&F UIの委譲を提供します。- 導入されたバージョン:
- 1.7
-
-
ネストされたクラスのサマリー
-
クラス javax.swing.plaf.basic.BasicSliderUIから継承されたネストされたクラス/インタフェース
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener
-
-
フィールドのサマリー
-
クラス javax.swing.plaf.basic.BasicSliderUIから継承されたフィールド
changeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect
-
インタフェース javax.swing.plaf.synth.SynthConstantsから継承されたフィールド
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
-
-
コンストラクタのサマリー
コンストラクタ 修飾子 コンストラクタ 説明 protected
SynthSliderUI(JSlider c)
SynthSliderUI
を構築します。
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 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)
最小サイズを返します。Dimension
getPreferredSize(JComponent c)
優先サイズを返します。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)
値のx位置を返します。protected int
yPositionForValue(int value, int trackY, int trackHeight)
指定された値のyの位置を返します。-
クラス javax.swing.plaf.basic.BasicSliderUIから継承されたメソッド
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, yPositionForValue
-
クラス javax.swing.plaf.ComponentUIから継承されたメソッド
contains, getAccessibleChild, getAccessibleChildrenCount
-
-
-
-
コンストラクタの詳細
-
SynthSliderUI
protected SynthSliderUI(JSlider c)
SynthSliderUI
を構築します。- パラメータ:
c
- スライダ
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent c)
指定されたコンポーネントの新しいUIオブジェクトを作成します。- パラメータ:
c
- UIオブジェクトを作成するコンポーネント- 戻り値:
- UIオブジェクト
-
installDefaults
protected void installDefaults(JSlider slider)
デフォルトをインストールします。- オーバーライド:
installDefaults
、クラス:BasicSliderUI
- パラメータ:
slider
- スライダ
-
uninstallDefaults
protected void uninstallDefaults(JSlider slider)
デフォルトの設定をアンインストールします。 このメソッドは、LookAndFeel
のアンインストール時に呼び出されます。- オーバーライド:
uninstallDefaults
、クラス:BasicSliderUI
- パラメータ:
slider
- スライダ
-
installListeners
protected void installListeners(JSlider slider)
リスナーをインストールします。- オーバーライド:
installListeners
、クラス:BasicSliderUI
- パラメータ:
slider
- スライダ
-
uninstallListeners
protected void uninstallListeners(JSlider slider)
リスナーをアンインストールします。- オーバーライド:
uninstallListeners
、クラス:BasicSliderUI
- パラメータ:
slider
- スライダ
-
createTrackListener
protected BasicSliderUI.TrackListener createTrackListener(JSlider s)
トラック・リスナーを作成します。- オーバーライド:
createTrackListener
、クラス:BasicSliderUI
- パラメータ:
s
- スライダ- 戻り値:
- トラック・リスナー
-
getBaseline
public int getBaseline(JComponent c, int width, int height)
ベースラインを返します。- オーバーライド:
getBaseline
、クラス:BasicSliderUI
- パラメータ:
c
- ベースラインが要求されるJComponent
width
- ベースラインを取得する幅height
- ベースラインを取得する高さ- 戻り値:
- ベースラインまたは0より小さい値(適切なベースラインがないことを示す)
- 関連項目:
JComponent.getBaseline(int, int)
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
優先サイズを返します。- オーバーライド:
getPreferredSize
、クラス:BasicSliderUI
- パラメータ:
c
- コンポーネント- 戻り値:
- 推奨サイズ
- 関連項目:
JComponent.getPreferredSize()
,LayoutManager.preferredLayoutSize(java.awt.Container)
-
getMinimumSize
public Dimension getMinimumSize(JComponent c)
最小サイズを返します。- オーバーライド:
getMinimumSize
、クラス:BasicSliderUI
- パラメータ:
c
- コンポーネント- 戻り値:
- 最小サイズ
- 関連項目:
JComponent.getMinimumSize()
,LayoutManager.minimumLayoutSize(java.awt.Container)
,ComponentUI.getPreferredSize(javax.swing.JComponent)
-
calculateGeometry
protected void calculateGeometry()
ジオメトリを計算します。- オーバーライド:
calculateGeometry
、クラス:BasicSliderUI
-
layout
protected void layout()
スライダを配置します。
-
calculateThumbLocation
protected void calculateThumbLocation()
サムのロケーションを計算します。- オーバーライド:
calculateThumbLocation
、クラス:BasicSliderUI
-
setThumbLocation
public void setThumbLocation(int x, int y)
サム・ロケーションを設定します。- オーバーライド:
setThumbLocation
、クラス:BasicSliderUI
- パラメータ:
x
- x座標y
- y座標
-
xPositionForValue
protected int xPositionForValue(int value)
値のx位置を返します。- オーバーライド:
xPositionForValue
、クラス:BasicSliderUI
- パラメータ:
value
- 値- 戻り値:
- 値のx位置
-
yPositionForValue
protected int yPositionForValue(int value, int trackY, int trackHeight)
指定された値のyの位置を返します。 引数のチェックは行われません。 特に、trackHeight
が負の数だった場合の結果は保証されません。- オーバーライド:
yPositionForValue
、クラス:BasicSliderUI
- パラメータ:
value
- 位置を取得するスライダ値trackY
- トラックのy原点trackHeight
- トラックの高さ- 戻り値:
- スライダの指定された値のyロケーション
-
valueForYPosition
public int valueForYPosition(int yPos)
y位置の値を返します。yPos
が最下部または最上部のトラックを超えている場合、このメソッドは、スライダが反転されているかどうかに応じて、スライダの最小値または最大値のいずれかに値を設定します。- オーバーライド:
valueForYPosition
、クラス:BasicSliderUI
- パラメータ:
yPos
- y軸に沿ったスライダのロケーション- 戻り値:
- y位置の値
-
valueForXPosition
public int valueForXPosition(int xPos)
x位置の値を返します。xPos
が左端または右端のトラックを越えている場合、このメソッドはスライダが反転しているかどうかに応じて、スライダの最小値または最大値に値を設定します。- オーバーライド:
valueForXPosition
、クラス:BasicSliderUI
- パラメータ:
xPos
- x軸に沿ったスライダのロケーション- 戻り値:
- x位置の値
-
getThumbSize
protected Dimension getThumbSize()
サムのサイズを返します。- オーバーライド:
getThumbSize
、クラス:BasicSliderUI
- 戻り値:
- サムのサイズ
-
recalculateIfInsetsChanged
protected void recalculateIfInsetsChanged()
インセットが変更された場合は再計算します。- オーバーライド:
recalculateIfInsetsChanged
、クラス:BasicSliderUI
-
getContext
public SynthContext getContext(JComponent c)
指定されたコンポーネントのコンテキストを返します。- 定義:
getContext
、インタフェース:SynthUI
- パラメータ:
c
- SynthContextを要求するコンポーネント。- 戻り値:
- コンポーネントを記述するSynthContext。
-
update
public void update(Graphics g, JComponent c)
このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。 このメソッドはコンポーネントのバックグラウンドをペイントし、paint(SynthContext,Graphics)
メソッドを呼び出します。一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードを
paint
メソッドに入れるようにしてください。- オーバーライド:
update
、クラス:ComponentUI
- パラメータ:
g
- ペイントに使用されるGraphics
オブジェクトc
- ペイントされるコンポーネント- 関連項目:
paint(SynthContext,Graphics)
-
paint
public void paint(Graphics g, JComponent c)
Look & Feelに従って、指定されたコンポーネントをペイントします。このメソッドは、Synth Look & Feelで使用されません。 ペイントは
paint(SynthContext,Graphics)
メソッドによって処理されます。- オーバーライド:
paint
、クラス:BasicSliderUI
- パラメータ:
g
- ペイントに使用されるGraphics
オブジェクトc
- ペイントされるコンポーネント- 関連項目:
paint(SynthContext,Graphics)
-
paint
protected void paint(SynthContext context, Graphics g)
指定されたコンポーネントをペイントします。- パラメータ:
context
- ペイントされるコンポーネントのコンテキストg
- ペイントに使用されるGraphics
オブジェクト- 関連項目:
update(Graphics,JComponent)
-
paintBorder
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
- ボーダーの高さ
-
paintThumb
protected void paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds)
スライダのつまみをペイントします。- パラメータ:
context
- ペイントされるコンポーネントのコンテキストg
- ペイントに使用されるGraphics
オブジェクトthumbBounds
- サムのバウンディング・ボックス
-
paintTrack
protected void paintTrack(SynthContext context, Graphics g, Rectangle trackBounds)
スライダのトラックをペイントします。- パラメータ:
context
- ペイントされるコンポーネントのコンテキストg
- ペイントに使用されるGraphics
オブジェクトtrackBounds
- トラックのバウンディング・ボックス
-
propertyChange
public void propertyChange(PropertyChangeEvent e)
バウンド・プロパティの変更時に呼び出されます。- 定義:
propertyChange
、インタフェース:PropertyChangeListener
- パラメータ:
e
- イベント・ソースと変更されたプロパティを記述したPropertyChangeEventオブジェクト。
-
-