クラスMetalSliderUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SliderUI
javax.swing.plaf.basic.BasicSliderUI
javax.swing.plaf.metal.MetalSliderUI
public class MetalSliderUI extends BasicSliderUI
SliderUIのJava L&F実装です。
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4では、すべてのJavaBeansの長期ストレージのサポートがjava.beansパッケージに追加されました。 XMLEncoderを参照してください。
-
ネストされたクラスのサマリー
ネストされたクラスクラスBasicSliderUIで宣言されたネストされたクラス/インタフェース
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener修飾子と型クラス説明classドキュメントから削除されたこのクラスは、Java 2プラットフォーム1.3では使用しません。classデータ・モデルのリスナーです。classサイズ変更イベントのリスナーです。classフォーカス変更のリスナーです。classプロパティ変更ハンドラ。classスクロール・イベント・リスナーです。classマウスの動きを追跡します。 -
フィールドのサマリー
フィールド修飾子と型フィールド説明protected static Color暗い影の色。protected booleanプロパティJSlider.isFilledの値。protected static Colorハイライトの色。protected static Iconデフォルトの水平サムIconです。protected final StringJSlider.isFilledのプロパティ。protected static Colorサムの色protected final intティックのバッファ。protected static intティックの長さ。protected static intトラックの幅。protected static Iconデフォルトの垂直サムIconです。クラスで宣言されたフィールド 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修飾子と型フィールド説明protected ChangeListenerリスナーを変更protected ComponentListenerコンポーネント・リスナーprotected Rectangleコンテンツ矩形protected Insetsフォーカス・インセットprotected FocusListenerフォーカス・リスナーprotected Rectangleフォーカス矩形protected Insetsインセット・キャッシュprotected Rectangleラベル矩形protected boolean左から右へのキャッシュstatic final int最大スクロールstatic final int最小スクロールstatic final intネガティブ・スクロールstatic final intポジティブ・スクロールprotected PropertyChangeListenerプロパティ変更リスナーprotected BasicSliderUI.ScrollListenerスクロール・リスナーprotected Timerスクロール・タイマーprotected JSliderSliderprotected Rectangleサムの矩形protected RectangleTick rectangleprotected intトラックがコントロールの側面からの距離protected BasicSliderUI.TrackListenerトラック・リスナーprotected Rectangleトラック矩形 -
コンストラクタのサマリー
コンストラクタ -
メソッドのサマリー
修飾子と型メソッド説明protected PropertyChangeListenercreatePropertyChangeListener(JSlider slider) MetalPropertyListenerを構築します。static ComponentUIMetalSliderUIインスタンスを構築します。protected intサムがスライド・バーを超過する部分の量を返します。int水平スライダの目盛り領域の高さおよび垂直スライダの目盛り領域の幅を返します。protected intスライド・バーの長辺の寸法を返します。protected intトラックの短辺の寸法を返します。クラスで宣言されたメソッド BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getThumbSize, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, installUI, isDragging, labelsHaveSameBaselines, paintFocus, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintThumb, paintTicks, paintTrack, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, setThumbLocation, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue修飾子と型メソッド説明protected voidコンテンツの矩形を計算します。protected voidフォーカス矩形を計算します。protected voidジオメトリを計算します。protected voidラベル矩形を計算します。protected voidサムのロケーションを計算します。protected voidサムのサイズの矩形を計算します。protected voidティック矩形を計算します。protected voidトラック・バッファを計算します。protected voidトラックの矩形を計算します。protected ChangeListenercreateChangeListener(JSlider slider) 変更リスナーを作成します。protected ComponentListenercreateComponentListener(JSlider slider) コンポジット・リスナーを作成します。protected FocusListenercreateFocusListener(JSlider slider) フォーカス・リスナーを作成します。protected BasicSliderUI.ScrollListenercreateScrollListener(JSlider slider) スクロール・リスナーを作成します。protected BasicSliderUI.TrackListenercreateTrackListener(JSlider slider) トラック・リスナーを作成します。protected boolean逆に描画します。intgetBaseline(JComponent c, int width, int height) ベースラインを返します。サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。protected Colorフォーカス・カラーを返します。protected int最高値ラベルの高さを返します。protected int最小値ラベルの高さを返します。protected int最も高いラベルの高さを返します。protected Integerラベル・テーブル内でエントリを持つ値の最大値を返します。protected Componentラベル・テーブル内で最小スライダ値に対応するラベルを返します。protected Colorハイライトの色を返します。protected Integerラベル・テーブル内でエントリを持つ値の最小値を返します。protected Componentラベル・テーブル内で最大スライダ値に対応するラベルを返します。最大サイズを返します。最小水平サイズを返します。最小サイズを返します。最小垂直サイズを返します。優先水平サイズを返します。優先サイズを返します。優先される垂直サイズを返します。protected Colorシャドウの色を返します。protected Dimensionサムのサイズを返します。protected int最高値ラベルの幅を返します。protected int最小値ラベルの幅を返します。protected int最も広いラベルの幅を返します。protected voidinstallDefaults(JSlider slider) デフォルトをインストールします。protected voidinstallKeyboardActions(JSlider slider) キーボード操作をインストールします。protected voidinstallListeners(JSlider slider) リスナーをインストールします。voidUIをインストールします。protected booleanユーザーがスライダをドラッグしている場合はtrueを返します。protected booleanラベル・テーブルのすべてのラベルのベースラインが同じである場合にtrueを返します。void絵の焦点。protected voidpaintHorizontalLabel(Graphics g, int value, Component label) ラベル・テーブルの各ラベルに対して呼び出されます。voidラベルをペイントします。protected voidpaintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) 水平スライダの目盛りをペイントします。protected voidpaintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) 垂直スライダの目盛りをペイントします。protected voidpaintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) 水平スライダのマイナー・ティックをペイントします。protected voidpaintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) 垂直スライダのマイナー・ティックをペイントします。voidサムを塗ります。voidティックを塗ります。voidペイント・トラック。protected voidpaintVerticalLabel(Graphics g, int value, Component label) ラベル・テーブルの各ラベルに対して呼び出されます。protected voidインセットが変更された場合に再計算されます。protected void方向が変更された場合に再計算されます。voidscrollByBlock(int direction) ブロックごとにスクロールします。voidscrollByUnit(int direction) 単位でスクロールします。protected voidscrollDueToClickInTrack(int dir) つまみではなくトラックでmousePressedが検出されたときに呼び出されます。voidsetThumbLocation(int x, int y) サムのロケーションを設定します。protected voiduninstallDefaults(JSlider slider) デフォルトをアンインストールします。protected voiduninstallKeyboardActions(JSlider slider) キーボード操作をアンインストールします。protected voiduninstallListeners(JSlider slider) リスナーをアンインストールします。voidUIをアンインストールします。intvalueForXPosition(int xPos) x位置の値を返します。intvalueForYPosition(int yPos) y位置の値を返します。protected intxPositionForValue(int value) 値のx位置を返します。protected intyPositionForValue(int value) 値のy位置を返します。protected intyPositionForValue(int value, int trackY, int trackHeight) 指定された値のyの位置を返します。クラスで宣言されたメソッド ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update修飾子と型メソッド説明booleancontains(JComponent c, int x, int y) 指定された x,yの位置が、指定されたコンポーネントのLook & Feel定義の形状内にある場合は、trueを返します。getAccessibleChild(JComponent c, int i) オブジェクトのi番目のAccessibleの子を返します。intオブジェクト内のアクセシビリティ対応の子の数を返します。voidpaint(Graphics g, JComponent c) 指定されたコンポーネントをLook & Feelに合わせてペイントします。voidupdate(Graphics g, JComponent c) 指定されたコンポーネントをペイントする時間になったことを、このUI委譲に通知します。クラスオブジェクトで宣言されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait修飾子と型メソッド説明protected Objectclone()このオブジェクトのコピーを作成して、返します。booleanこのオブジェクトと他のオブジェクトが等しいかどうかを示します。protected voidfinalize()削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。最終決定は非推奨であり、将来のリリースで削除される可能性があります。final Class<?> getClass()このObjectの実行時クラスを返します。inthashCode()このオブジェクトに対するハッシュ・コード値を返します。final voidnotify()このオブジェクトのモニターで待機中のスレッドを1つ再開します。final voidこのオブジェクトのモニターで待機中のすべてのスレッドを再開します。toString()オブジェクトの文字列表現を返します。final voidwait()現在のスレッドが目覚めるまで待機します。通常、notifiedまたはinterruptedです。final voidwait(long timeoutMillis) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。final voidwait(long timeoutMillis, int nanos) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
-
フィールド詳細
-
TICK_BUFFER
protected final int TICK_BUFFERティックのバッファ。- 関連項目:
-
filledSlider
protected boolean filledSliderプロパティJSlider.isFilledの値。 デフォルトでは、プロパティが設定されていない場合はfalse、海洋テーマの場合はtrueです。 -
thumbColor
protected static Color thumbColorサムの色 -
highlightColor
protected static Color highlightColorハイライトの色。 -
darkShadowColor
protected static Color darkShadowColor暗い影の色。 -
trackWidth
protected static int trackWidthトラックの幅。 -
tickLength
protected static int tickLengthティックの長さ。 -
horizThumbIcon
protected static Icon horizThumbIconデフォルトの水平サムIconです。 このフィールドは使用できません。 この委譲によって使用されるIconを変更するには、Slider.horizontalThumbIconUIManagerプロパティを使用して直接設定します。 -
vertThumbIcon
protected static Icon vertThumbIconデフォルトの垂直サムIconです。 このフィールドは使用できません。 この委譲によって使用されるIconを変更するには、Slider.verticalThumbIconUIManagerプロパティを使用して直接設定します。 -
SLIDER_FILL
-
-
コンストラクタの詳細
-
MetalSliderUI
public MetalSliderUI()MetalSliderUIインスタンスを構築します。
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent c) MetalSliderUIインスタンスを構築します。- パラメータ:
c- コンポーネント- 戻り値:
MetalSliderUIインスタンス
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener(JSlider slider) MetalPropertyListenerを構築します。- オーバーライド:
createPropertyChangeListener、クラスBasicSliderUI- パラメータ:
slider- aJSlider- 戻り値:
- the
MetalPropertyListener
-
getTickLength
public int getTickLength()水平スライダの目盛り領域の高さおよび垂直スライダの目盛り領域の幅を返します。 BasicSliderUIは戻り値を使って目盛り領域の矩形を決定します。- オーバーライド:
getTickLength、クラスBasicSliderUI- 戻り値:
- 水平スライダのティック領域の高さを表す整数と、垂直スライダのティック領域の幅
-
getTrackWidth
protected int getTrackWidth()トラックの短辺の寸法を返します。- 戻り値:
- トラックの短い方のディメンション
-
getTrackLength
protected int getTrackLength()スライド・バーの長辺の寸法を返します。 (スライド・バーはサムがその上を移動する部分)- 戻り値:
- スライド・バーのより長いディメンション
-
getThumbOverhang
protected int getThumbOverhang()サムがスライド・バーを超過する部分の量を返します。- 戻り値:
- サムがスライド・バーを通過する量
-