- 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>
-
- 型パラメータ:
T
- ListCell内に含まれるアイテムの型。
- すべての実装されたインタフェース:
Styleable
,EventTarget
,Skinnable
- 直系の既知のサブクラス:
CheckBoxListCell
,ChoiceBoxListCell
,ComboBoxListCell
,TextFieldListCell
public class ListCell<T> extends IndexedCell<T>
ListView
インスタンス内で使用されるCell
型。 CellおよびIndexedCell
に定義されているAPIに加えて、ListCellはListViewにより強く結合され、編集イベントなどをより適切にサポートできます。ListViewは、どのセルが選択されているかを示す選択と、特定のListViewの現在のフォーカス所有者を示すフォーカスを保持します。 プロパティごとに、各ListCellは、その特定のセルが選択されているか、フォーカスされているかを反映するブールを保持します。 このことを実現するために、各ListCellにはそれが使用されているListViewに対する逆方向の参照があります。 各ListCellは、1つのListViewにのみ属します。
ListViewなどの仮想コントロールの場合、セルにフォーカスがあっても、アプリケーション・フォーカスと同じ意味ではないことに注意してください。 ListCellにフォーカスがある場合は、所有するListViewに実際にフォーカスが含まれているという状況において、そのセルがキーボード・イベントを受け取ることを表しているのみです。 セルの
graphic
プロパティにノードが設定されている場合は、通常想定されるとおり、このノードがフォーカスをリクエストして取得しても問題ありません。- 導入されたバージョン:
- JavaFX 2.0
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 ReadOnlyObjectProperty<ListView<T>>
listView
このCellに関連付けられているListView。-
クラス 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
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 ListCell()
list-cellというデフォルトのスタイル・クラスでデフォルトのListCellを作成します。
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 void
cancelEdit()
この関数を呼び出して、ユーザーによる入力を保存せずに、編集状態から非編集状態に遷移します。void
commitEdit(T newValue)
この関数を(セル編集ユーザー・インタフェースのユーザー操作要件に基づく)適切な場合に呼び出して、次の2つのことを実行します: 適切なイベントをバッキングUIコントロールに戻す(たとえば、protected Skin<?>
createDefaultSkin()
このコントロールのデフォルト・スキンの新しいインスタンスを作成します。void
executeAccessibleAction(AccessibleAction action, Object... parameters)
このメソッドは、引数で指定されたアクションの実行をリクエストするためにアシスティブ・テクノロジによって呼び出されます。ListView<T>
getListView()
プロパティlistViewの値を取得します。ReadOnlyObjectProperty<ListView<T>>
listViewProperty()
このCellに関連付けられているListView。Object
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
このメソッドは、属性の値をリクエストするためにアシスティブ・テクノロジによって呼び出されます。void
startEdit()
この関数を呼び出して、セルが編集可能な場合に、非編集状態から編集状態に遷移します。void
updateListView(ListView<T> listView)
このセルに関連付けられたListViewを更新します。-
クラス javafx.scene.control.Cellから継承されたメソッド
editableProperty, editingProperty, emptyProperty, getInitialFocusTraversable, getItem, isEditable, isEditing, isEmpty, isItemChanged, isSelected, itemProperty, layoutChildren, selectedProperty, setEditable, setItem, updateItem, updateSelected
-
クラス javafx.scene.control.Controlから継承されたメソッド
computeMaxHeight、computeMaxWidth、computeMinHeight、computeMinWidth、computePrefHeight、computePrefWidth、contextMenuProperty、getBaselineOffset、getContextMenu、getCssMetaData、getSkin、getTooltip、isResizable、setContextMenu、setSkin、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, toString, underlineProperty, wrapTextProperty
-
クラス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, 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, getStyleClass, 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, 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, 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, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
クラス java.lang.Objectから継承されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、wait、wait、wait
-
クラス javafx.scene.Parentから継承されたメソッド
getChildren、getChildrenUnmodifiable、getManagedChildren、getStylesheets、isNeedsLayout、layout、lookup、needsLayoutProperty、requestLayout、requestParentLayout、setNeedsLayout、updateBounds
-
クラス javafx.scene.layout.Regionから継承されたメソッド
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, 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
-
-
-
-
プロパティの詳細
-
listView
public final ReadOnlyObjectProperty<ListView<T>> listViewProperty
このCellに関連付けられているListView。- 関連項目:
getListView()
-
-
メソッドの詳細
-
getListView
public final ListView<T> getListView()
プロパティlistViewの値を取得します。- プロパティの説明:
- このCellに関連付けられているListView。
-
listViewProperty
public final ReadOnlyObjectProperty<ListView<T>> listViewProperty()
このCellに関連付けられているListView。- 関連項目:
getListView()
-
createDefaultSkin
protected Skin<?> createDefaultSkin()
このコントロールのデフォルト・スキンの新しいインスタンスを作成します。 これは、CSS-fx-skin
を介してスキンが提供されていない場合にコントロール用のスキンを作成するために、またはsetSkin(...)
を使用してサブクラスで明示的に設定するために呼び出されます。- オーバーライド:
createDefaultSkin
、クラス:Control
- 戻り値:
- このコントロールのデフォルト・スキンの新しいインスタンス。 nullの場合、コントロールにはスキンがありません(Cssで提供されている場合を除く)。
-
startEdit
public void startEdit()
この関数を呼び出して、セルが編集可能な場合に、非編集状態から編集状態に遷移します。 セルがすでに編集状態である場合は、その状態のままになります。
-
commitEdit
public void commitEdit(T newValue)
セル編集ユーザー・インタフェースのユーザー操作要件に基づいて適切な場合に、この関数を呼び出して、次の2つのことを実行します。- 適切なイベントを起動してバッキングUIコントロール(
ListView
など)に戻します。 これにより、この編集をプッシュして関連データ・ソースやプロパティに戻すプロセスが開始されます(ただし、正常終了は保証されません。つまり、使用される特定の編集コミット・ハンドラに依存します)。 詳細は、UIコントロール・クラスのjavadocを参照してください。 - 編集状態から非編集状態への遷移を開始します。
一般的に、カスタム・セル実装でこのメソッドをオーバーライドする必要はありません。必要に応じてこのメソッドを呼び出すのみで十分です(たとえば、ユーザーが[Enter]キーを押したときに
cell.commitEdit(converter.fromString(textField.getText()));
などを実行できます)。- オーバーライド:
commitEdit
、クラス:Cell<T>
- パラメータ:
newValue
- エンド・ユーザーが入力した値であり、ユーザー・インタフェースを支援するデータ・ソース、およびUIコントロールのインストール編集コミット・ハンドラで指定された関連する方法で保持される必要があります。
- 適切なイベントを起動してバッキングUIコントロール(
-
cancelEdit
public void cancelEdit()
この関数を呼び出して、ユーザーによる入力を保存せずに、編集状態から非編集状態に遷移します。- オーバーライド:
cancelEdit
、クラス:Cell<T>
-
updateListView
public final void updateListView(ListView<T> listView)
このセルに関連付けられたListViewを更新します。 ノート: この機能は、主に新しいスキンを実装する者が専門家によって使用されることを意図しています。 開発者や設計者がこの機能に直接アクセスするのは一般的ではありません。- パラメータ:
listView
- このセルに関連付けられたListView
-
queryAccessibleAttribute
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
このメソッドは、属性の値をリクエストするためにアシスティブ・テクノロジによって呼び出されます。このメソッドは一般に、特定の役割に必要な属性を実装するためにサブクラスによってオーバーライドされます。
特定の属性が処理されない場合は、スーパークラスの実装を呼び出す必要があります。- オーバーライド:
queryAccessibleAttribute
、クラス:Control
- パラメータ:
attribute
- リクエストされた属性parameters
- オプションのパラメータ・リスト- 戻り値:
- リクエストされた属性の値
- 関連項目:
AccessibleAttribute
-
executeAccessibleAction
public void executeAccessibleAction(AccessibleAction action, Object... parameters)
このメソッドは、引数で指定されたアクションの実行をリクエストするためにアシスティブ・テクノロジによって呼び出されます。このメソッドは一般に、特定の役割に必要なアクションを実装するためにサブクラスによってオーバーライドされます。
特定のアクションが処理されない場合は、スーパークラスの実装を呼び出す必要があります。- オーバーライド:
executeAccessibleAction
、クラス:Control
- パラメータ:
action
- 実行するアクションparameters
- オプションのパラメータ・リスト- 関連項目:
「AccessibleAction」
-
-