- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- javafx.scene.control.Labeled
-
- javafx.scene.control.Cell<T>
-
- javafx.scene.control.IndexedCell<T>
-
- javafx.scene.control.ListCell<T>
-
- javafx.scene.control.cell.CheckBoxListCell<T>
-
- 型パラメータ:
T
- ListViewに含まれる要素の型。
- すべての実装されたインタフェース:
Styleable
,EventTarget
,Skinnable
public class CheckBoxListCell<T> extends ListCell<T>
セル内にCheckBox
ノードを描画し、オプションでチェック・ボックスの意味を示すラベルを追加するListCell
実装を含むクラス。CheckBoxListCellは、
ListView
の左側にCheckBox、水平方向の残りのすべてのスペースにリスト・アイテムに関連するテキストを配置してレンダリングされます。このクラスのインスタンスを構築するには、型Tのオブジェクトを入力とし、指定されたアイテムが選択されているかどうかを表す
ObservableValue<Boolean>
を返すCallback
を指定する必要があります。 このObservableValueは双方向(セル内のCheckBoxはユーザーの操作に基づいてこのプロパティを設定/設定解除し、CheckBoxは外部から変更された場合はObservableValue<Boolean>
の状態を反映)バインドされます。CheckBoxListCellはCheckBoxをライブ・レンダリングすること、つまり、CheckBoxは常に対話型で、ユーザーが直接切り替えることに注意してください。 これは、セルがその
editing state
に入る必要がないことを意味します(通常は、ユーザーがセル上をダブルクリックすると編集状態になります)。 これによる副次的影響は、通常の編集コールバック(on edit commit
など)が呼び出されないことです。 変更の通知を受け取る必要がある場合は、CheckBoxで操作されるブール型プロパティを直接監視することをお薦めします。
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 ObjectProperty<StringConverter<T>>
converter
StringConverter
プロパティ。ObjectProperty<Callback<T,ObservableValue<Boolean>>>
selectedStateCallback
画面上に表示されるCheckBoxでバインドされるCallback
を表すプロパティ。-
クラス javafx.scene.control.Controlで宣言されたプロパティ
contextMenu、skin、tooltip
-
クラス javafx.scene.control.IndexedCellで宣言されたプロパティ
index
-
クラス javafx.scene.control.Labeledで宣言されたプロパティ
alignment、contentDisplay、ellipsisString、font、graphic、graphicTextGap、labelPadding、lineSpacing、mnemonicParsing、textAlignment、textFill、textOverrun、text、underline、wrapText
-
クラス javafx.scene.Nodeで宣言されたプロパティ
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
クラス javafx.scene.Parentで宣言されたプロパティ
needsLayout
-
クラス javafx.scene.layout.Regionで宣言されたプロパティ
background、border、cacheShape、centerShape、height、insets、maxHeight、maxWidth、minHeight、minWidth、opaqueInsets、padding、prefHeight、prefWidth、scaleShape、shape、snapToPixel、width
-
-
フィールドのサマリー
-
クラス javafx.scene.Nodeで宣言されたフィールド
BASELINE_OFFSET_SAME_AS_HEIGHT
-
クラス javafx.scene.layout.Regionで宣言されたフィールド
USE_COMPUTED_SIZE、USE_PREF_SIZE
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 CheckBoxListCell()
デフォルトのCheckBoxListCellを作成します。CheckBoxListCell(Callback<T,ObservableValue<Boolean>> getSelectedProperty)
デフォルトのCheckBoxListCellを作成します。CheckBoxListCell(Callback<T,ObservableValue<Boolean>> getSelectedProperty, StringConverter<T> converter)
カスタム文字列コンバータを使用して、CheckBoxListCellを作成します。
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 ObjectProperty<StringConverter<T>>
converterProperty()
StringConverter
プロパティ。static <T> Callback<ListView<T>,ListCell<T>>
forListView(Callback<T,ObservableValue<Boolean>> getSelectedProperty)
ListViewコントロールで使用するセル・ファクトリを作成します。static <T> Callback<ListView<T>,ListCell<T>>
forListView(Callback<T,ObservableValue<Boolean>> getSelectedProperty, StringConverter<T> converter)
ListViewコントロールで使用するセル・ファクトリを作成します。StringConverter<T>
getConverter()
このセルで使用するStringConverter
を返します。Callback<T,ObservableValue<Boolean>>
getSelectedStateCallback()
画面上に表示されるCheckBoxによってバインドされるCallback
を返します。ObjectProperty<Callback<T,ObservableValue<Boolean>>>
selectedStateCallbackProperty()
画面上に表示されるCheckBoxでバインドされるCallback
を表すプロパティ。void
setConverter(StringConverter<T> value)
このセルで使用するStringConverter
を設定します。void
setSelectedStateCallback(Callback<T,ObservableValue<Boolean>> value)
画面上に表示されるCheckBoxによってバインドされるCallback
を設定します。-
クラス javafx.scene.control.Cellで宣言されたメソッド
cancelEdit, commitEdit, editableProperty, editingProperty, emptyProperty, getInitialFocusTraversable, getItem, isEditable, isEditing, isEmpty, isItemChanged, isSelected, itemProperty, selectedProperty, setEditable, setItem, startEdit, updateItem, updateSelected
-
クラス javafx.scene.control.Controlで宣言されたメソッド
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, contextMenuProperty, createDefaultSkin, getContextMenu, getCssMetaData, getTooltip, isResizable, setContextMenu, setTooltip, skinProperty, tooltipProperty
-
クラス javafx.scene.control.IndexedCellで宣言されたメソッド
getIndex、indexProperty、updateIndex
-
クラス javafx.scene.control.Labeledで宣言されたメソッド
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, getAlignment, getClassCssMetaData, getContentBias, getContentDisplay, getControlCssMetaData, getEllipsisString, getFont, getGraphic, getGraphicTextGap, getInitialAlignment, getLabelPadding, getLineSpacing, getText, getTextAlignment, getTextFill, getTextOverrun, graphicProperty, graphicTextGapProperty, isMnemonicParsing, isUnderline, isWrapText, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, setAlignment, setContentDisplay, setEllipsisString, setFont, setGraphic, setGraphicTextGap, setLineSpacing, setMnemonicParsing, setText, setTextAlignment, setTextFill, setTextOverrun, setUnderline, setWrapText, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, underlineProperty, wrapTextProperty
-
クラス javafx.scene.control.ListCellで宣言されたメソッド
getListView, listViewProperty, updateListView
-
クラス javafx.scene.Nodeで宣言されたメソッド
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
クラス java.lang.Objectで宣言されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、wait、wait、wait
-
クラス javafx.scene.Parentで宣言されたメソッド
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
クラス javafx.scene.layout.Regionで宣言されたメソッド
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computePrefHeight, computePrefWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
-
インタフェース javafx.css.Styleableで宣言されたメソッド
getStyleableNode, getStyleClass
-
-
-
-
プロパティの詳細
-
converter
public final ObjectProperty<StringConverter<T>> converterProperty
StringConverter
プロパティ。- 戻り値:
StringConverter
プロパティ
-
selectedStateCallback
public final ObjectProperty<Callback<T,ObservableValue<Boolean>>> selectedStateCallbackProperty
画面上に表示されるCheckBoxでバインドされるCallback
を表すプロパティ。
-
-
コンストラクタの詳細
-
CheckBoxListCell
public CheckBoxListCell()
デフォルトのCheckBoxListCellを作成します。
-
CheckBoxListCell
public CheckBoxListCell(Callback<T,ObservableValue<Boolean>> getSelectedProperty)
デフォルトのCheckBoxListCellを作成します。- パラメータ:
getSelectedProperty
- ListViewからのアイテムを入力とし、ObservableValue<Boolean>
を返すCallback
。
-
CheckBoxListCell
public CheckBoxListCell(Callback<T,ObservableValue<Boolean>> getSelectedProperty, StringConverter<T> converter)
カスタム文字列コンバータを使用して、CheckBoxListCellを作成します。- パラメータ:
getSelectedProperty
- ListViewからのアイテムを入力とし、ObservableValue<Boolean>
を返すCallback
。converter
- 型Tのオブジェクトを入力とし、オブジェクトを視覚的に表すために使用できる文字列を返すStringConverter。
-
-
メソッドの詳細
-
forListView
public static <T> Callback<ListView<T>,ListCell<T>> forListView(Callback<T,ObservableValue<Boolean>> getSelectedProperty)
ListViewコントロールで使用するセル・ファクトリを作成します。 ListViewで使用される場合、CheckBoxListCell
は、ListViewの左側にCheckBox、水平方向の残りのすべてのスペースにリスト・アイテムに関連するテキストを配置してレンダリングされます。- 型パラメータ:
T
- ListViewに含まれる要素の型。- パラメータ:
getSelectedProperty
- 型T (ListView<T>.items
リストから取得された値)のオブジェクトを入力とし、指定されたアイテムが選択されているかどうかを表すObservableValue<Boolean>
を返すCallback
。 このObservableValueは、双方向にバインドされます(つまり、セル内のCheckBoxがユーザー操作に基づいてこのプロパティを設定または設定解除し、CheckBoxは変更が外部で行われた場合、ObservableValueの状態を反映します)。- 戻り値:
- ListViewアイテム・リストに含まれる要素の型で動作できるListCellを返す
Callback
。
-
forListView
public static <T> Callback<ListView<T>,ListCell<T>> forListView(Callback<T,ObservableValue<Boolean>> getSelectedProperty, StringConverter<T> converter)
ListViewコントロールで使用するセル・ファクトリを作成します。 ListViewで使用される場合、CheckBoxListCell
は、ListViewの左側にCheckBox、水平方向の残りのすべてのスペースにリスト・アイテムに関連するテキストを配置してレンダリングされます。- 型パラメータ:
T
- ListViewに含まれる要素の型。- パラメータ:
getSelectedProperty
- 型T (ListView<T>.items
リストから取得された値)のオブジェクトを入力とし、指定されたアイテムが選択されているかどうかを表すObservableValue<Boolean>
を返すCallback
。 このObservableValueは、双方向にバインドされます(つまり、セル内のCheckBoxがユーザー操作に基づいてこのプロパティを設定または設定解除し、CheckBoxは変更が外部で行われた場合、ObservableValueの状態を反映します)。converter
- 型Tのオブジェクトを入力とし、オブジェクトを視覚的に表すために使用できる文字列を返すStringConverter。- 戻り値:
- ListViewに含まれる要素の型で動作できるListCellを返す
Callback
。
-
converterProperty
public final ObjectProperty<StringConverter<T>> converterProperty()
StringConverter
プロパティ。- 戻り値:
StringConverter
プロパティ
-
setConverter
public final void setConverter(StringConverter<T> value)
このセルで使用するStringConverter
を設定します。- パラメータ:
value
-StringConverter
-
getConverter
public final StringConverter<T> getConverter()
このセルで使用するStringConverter
を返します。- 戻り値:
- このセルで使用される
StringConverter
-
selectedStateCallbackProperty
public final ObjectProperty<Callback<T,ObservableValue<Boolean>>> selectedStateCallbackProperty()
画面上に表示されるCheckBoxでバインドされるCallback
を表すプロパティ。
-
setSelectedStateCallback
public final void setSelectedStateCallback(Callback<T,ObservableValue<Boolean>> value)
画面上に表示されるCheckBoxによってバインドされるCallback
を設定します。- パラメータ:
value
-Callback
-
-