-
- すべての実装されたインタフェース:
Styleable
,EventTarget
,Skinnable
public class CheckBox extends ButtonBase
通常、選択されたときにチェックマークまたは目盛が表示されるボックスとして示されるトライステート選択コントロール。 CheckBoxコントロールの状態は、次の3つのうちのいずれかになります。- checked: indeterminate == false、checked == true
- unchecked: indeterminate == false、checked == false
- undefined: indeterminate == true
CheckBoxは、selectedがfalseで、indeterminateがfalseの場合、選択が解除になります。
CheckBoxは、選択の状態に関係なく、indeterminateがtrueの場合は未定義になります。 通常のレンダリングでは、CheckBoxの未定義または不確定の状態を示すために、マイナスまたはダッシュが使用されます。 これは、トライステート・チェック・ボックス・ベースのツリー(未定義のチェック・ボックスは通常、親からの設定の継承を意味するなど)を構築する場合に役立ちます。
allowIndeterminate変数がtrueの場合、ユーザーは未定義状態を循環表示することができます。 falseの場合、CheckBoxは不確定状態ではなく、ユーザーは選択状態のみを変更できます。
例:
CheckBox cb = new CheckBox("a checkbox"); cb.setIndeterminate(false);
CheckBoxのMnemonicParsingは、デフォルトで有効になっています。
- 導入されたバージョン:
- JavaFX 2.0
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 BooleanProperty
allowIndeterminate
CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。BooleanProperty
indeterminate
CheckBoxが中間状態であるかどうかを判別します。BooleanProperty
selected
このCheckBoxが選択されているかどうかを示します。-
クラス javafx.scene.control.ButtonBaseで宣言されたプロパティ
armed、onAction
-
クラス javafx.scene.control.Controlで宣言されたプロパティ
contextMenu、skin、tooltip
-
クラス 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
-
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 BooleanProperty
allowIndeterminateProperty()
CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。void
fire()
CheckBox
の状態を切り替えます。BooleanProperty
indeterminateProperty()
CheckBoxが中間状態であるかどうかを判別します。boolean
isAllowIndeterminate()
プロパティallowIndeterminateの値を取得します。boolean
isIndeterminate()
プロパティindeterminateの値を取得します。boolean
isSelected()
プロパティselectedの値を取得します。BooleanProperty
selectedProperty()
このCheckBoxが選択されているかどうかを示します。void
setAllowIndeterminate(boolean value)
プロパティallowIndeterminateの値を設定します。void
setIndeterminate(boolean value)
プロパティindeterminateの値を設定します。void
setSelected(boolean value)
プロパティselectedの値を設定します。-
クラス javafx.scene.control.ButtonBaseで宣言されたメソッド
arm、armedProperty、disarm、getOnAction、isArmed、onActionProperty、setOnAction
-
クラス javafx.scene.control.Controlで宣言されたメソッド
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, contextMenuProperty, createDefaultSkin, getContextMenu, getCssMetaData, getInitialFocusTraversable, getTooltip, isResizable, setContextMenu, setTooltip, skinProperty, tooltipProperty
-
クラス 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.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
-
-
-
-
プロパティの詳細
-
indeterminate
public final BooleanProperty indeterminateProperty
CheckBoxが中間状態であるかどうかを判別します。
-
selected
public final BooleanProperty selectedProperty
このCheckBoxが選択されているかどうかを示します。
-
allowIndeterminate
public final BooleanProperty allowIndeterminateProperty
CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。
-
-
コンストラクタの詳細
-
CheckBox
public CheckBox()
そのラベルが空の文字列のチェックボックスを作成します。
-
CheckBox
public CheckBox(String text)
ラベルとしてのテキストを指定してチェック・ボックスを作成します。- パラメータ:
text
- そのラベルのテキスト文字列。
-
-
メソッドの詳細
-
setIndeterminate
public final void setIndeterminate(boolean value)
プロパティindeterminateの値を設定します。- プロパティの説明:
- CheckBoxが中間状態であるかどうかを判別します。
-
isIndeterminate
public final boolean isIndeterminate()
プロパティindeterminateの値を取得します。- プロパティの説明:
- CheckBoxが中間状態であるかどうかを判別します。
-
indeterminateProperty
public final BooleanProperty indeterminateProperty()
CheckBoxが中間状態であるかどうかを判別します。
-
setSelected
public final void setSelected(boolean value)
プロパティselectedの値を設定します。- プロパティの説明:
- このCheckBoxが選択されているかどうかを示します。
-
isSelected
public final boolean isSelected()
プロパティselectedの値を取得します。- プロパティの説明:
- このCheckBoxが選択されているかどうかを示します。
-
selectedProperty
public final BooleanProperty selectedProperty()
このCheckBoxが選択されているかどうかを示します。
-
setAllowIndeterminate
public final void setAllowIndeterminate(boolean value)
プロパティallowIndeterminateの値を設定します。- プロパティの説明:
- CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。
true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。
-
isAllowIndeterminate
public final boolean isAllowIndeterminate()
プロパティallowIndeterminateの値を取得します。- プロパティの説明:
- CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。
true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。
-
allowIndeterminateProperty
public final BooleanProperty allowIndeterminateProperty()
CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。
-
fire
public void fire()
CheckBox
の状態を切り替えます。 allowIndeterminateがtrueの場合は、この関数の各呼出しでCheckBoxは3つの状態(選択、選択解除および未定義)を循環表示します。 allowIndeterminateがfalseの場合、CheckBoxは選択と選択解除の状態のみを循環表示し、不確定はfalseと同等になります。- 定義:
fire
、クラス:ButtonBase
-
-