T
- この値ファクトリが処理するデータの型であり、これは値ファクトリが設定されているSpinnerの型と一致する必要があります。public abstract class SpinnerValueFactory<T> extends Object
Spinner control
の背後にあるモデルであり、値ファクトリが導入されていない場合、Spinnerは使用できません。次のようなSpinnerのほぼすべての局面を処理するのは、値ファクトリの役割です。
value
の現在の状態を表す増分
および減分
するeditor
を介して)ユーザーからのテキスト入力を変換
するオブジェクトをユーザーが判読できる文字列に
変換するJavaFXには、次に示す一般的なタイプのSpinnerValueFactoryクラスが用意されています。
SpinnerValueFactory.IntegerSpinnerValueFactory
SpinnerValueFactory.DoubleSpinnerValueFactory
SpinnerValueFactory.ListSpinnerValueFactory
SpinnerValueFactory.LocalDateSpinnerValueFactory
Spinner
、SpinnerValueFactory.IntegerSpinnerValueFactory
、SpinnerValueFactory.DoubleSpinnerValueFactory
、SpinnerValueFactory.ListSpinnerValueFactory
、SpinnerValueFactory.LocalDateSpinnerValueFactory
Type | プロパティと説明 |
---|---|
ObjectProperty<StringConverter<T>> |
converter
|
ObjectProperty<T> |
value
SpinnerValueFactoryの現在の値を表し、値が設定されていない場合はnullになります。
|
BooleanProperty |
wrapAround
wrapAroundプロパティは、値ファクトリを循環型にするかどうかを指定するために使用します。
|
修飾子と型 | クラスと説明 |
---|---|
static class |
SpinnerValueFactory.DoubleSpinnerValueFactory
double値を反復処理するように設計された
SpinnerValueFactory 実装。 |
static class |
SpinnerValueFactory.IntegerSpinnerValueFactory
integer値を反復処理するように設計された
SpinnerValueFactory 実装。 |
static class |
SpinnerValueFactory.ListSpinnerValueFactory<T>
値リストを反復処理するように設計された
SpinnerValueFactory 実装。 |
コンストラクタと説明 |
---|
SpinnerValueFactory() |
修飾子と型 | メソッドと説明 |
---|---|
ObjectProperty<StringConverter<T>> |
converterProperty()
|
abstract void |
decrement(int steps)
指定されたステップ数ずつの
value の減分を試みます。 |
StringConverter<T> |
getConverter()
プロパティconverterの値を取得します。
|
T |
getValue()
プロパティvalueの値を取得します。
|
abstract void |
increment(int steps)
指定されたステップ数ずつの
value の増分を試みます。 |
boolean |
isWrapAround()
プロパティwrapAroundの値を取得します。
|
void |
setConverter(StringConverter<T> newValue)
プロパティconverterの値を設定します。
|
void |
setValue(T newValue)
プロパティvalueの値を設定します。
|
void |
setWrapAround(boolean value)
プロパティwrapAroundの値を設定します。
|
ObjectProperty<T> |
valueProperty()
SpinnerValueFactoryの現在の値を表し、値が設定されていない場合はnullになります。
|
BooleanProperty |
wrapAroundProperty()
wrapAroundプロパティは、値ファクトリを循環型にするかどうかを指定するために使用します。
|
public final ObjectProperty<T> valueProperty
getValue()
、setValue(T)
public final ObjectProperty<StringConverter<T>> converterProperty
public final BooleanProperty wrapAroundProperty
public abstract void decrement(int steps)
value
の減分を試みます。steps
- 値に対して実行する減分の数。public abstract void increment(int steps)
value
の増分を試みます。steps
- 値に対して実行する増分の数。public final T getValue()
public final void setValue(T newValue)
public final ObjectProperty<T> valueProperty()
getValue()
、setValue(T)
public final StringConverter<T> getConverter()
public final void setConverter(StringConverter<T> newValue)
public final ObjectProperty<StringConverter<T>> converterProperty()
public final void setWrapAround(boolean value)
public final boolean isWrapAround()
public final BooleanProperty wrapAroundProperty()
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.