public class CheckBox extends ButtonBase
CheckBoxは、selectedがfalseで、indeterminateがfalseの場合、選択が解除になります。
CheckBoxは、選択の状態に関係なく、indeterminateがtrueの場合は未定義になります。通常のレンダリングでは、CheckBoxの未定義または不確定の状態を示すために、マイナスまたはダッシュが使用されます。これは、トライステート・チェック・ボックス・ベースのツリー(未定義のチェック・ボックスは通常、親からの設定の継承を意味するなど)を構築する場合に役立ちます。
allowIndeterminate変数がtrueの場合、ユーザーは未定義状態を循環表示することができます。falseの場合、CheckBoxは不確定状態ではなく、ユーザーは選択状態のみを変更できます。
例:
CheckBox cb = new CheckBox("a checkbox");
cb.setIndeterminate(false);
CheckBoxのMnemonicParsingは、デフォルトで有効になっています。
Type | プロパティと説明 |
---|---|
BooleanProperty |
allowIndeterminate
CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。
|
BooleanProperty |
indeterminate
CheckBoxが中間状態であるかどうかを判別します。
|
BooleanProperty |
selected
このCheckBoxが選択されているかどうかを示します。
|
armed、onAction
alignment、contentDisplay、ellipsisString、font、graphic、graphicTextGap、labelPadding、lineSpacing、mnemonicParsing、textAlignment、textFill、textOverrun、text、underline、wrapText
contextMenu、skin、tooltip
background、border、cacheShape、centerShape、height、insets、maxHeight、maxWidth、minHeight、minWidth、opaqueInsets、padding、prefHeight、prefWidth、scaleShape、shape、snapToPixel、width
needsLayout
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、visible
USE_COMPUTED_SIZE、USE_PREF_SIZE
BASELINE_OFFSET_SAME_AS_HEIGHT
コンストラクタと説明 |
---|
CheckBox()
そのラベルが空の文字列のチェックボックスを作成します。
|
CheckBox(String text)
ラベルとしてのテキストを指定してチェック・ボックスを作成します。
|
修飾子と型 | メソッドと説明 |
---|---|
BooleanProperty |
allowIndeterminateProperty()
CheckBoxの切替時に、checked、unchecked、undefinedの3つのすべての状態を循環表示するかどうかを決定します。
|
protected Skin<?> |
createDefaultSkin()
このコントロールのデフォルト・スキンの新しいインスタンスを作成します。
|
void |
fire()
CheckBox の状態を切り替えます。 |
BooleanProperty |
indeterminateProperty()
CheckBoxが中間状態であるかどうかを判別します。
|
boolean |
isAllowIndeterminate()
プロパティallowIndeterminateの値を取得します。
|
boolean |
isIndeterminate()
プロパティindeterminateの値を取得します。
|
boolean |
isSelected()
プロパティselectedの値を取得します。
|
Object |
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
*アクセシビリティ処理* *
|
BooleanProperty |
selectedProperty()
このCheckBoxが選択されているかどうかを示します。
|
void |
setAllowIndeterminate(boolean value)
プロパティallowIndeterminateの値を設定します。
|
void |
setIndeterminate(boolean value)
プロパティindeterminateの値を設定します。
|
void |
setSelected(boolean value)
プロパティselectedの値を設定します。
|
arm、armedProperty、disarm、executeAccessibleAction、getOnAction、isArmed、onActionProperty、setOnAction
alignmentProperty、contentDisplayProperty、ellipsisStringProperty、fontProperty、getAlignment、getClassCssMetaData、getContentBias、getContentDisplay、getControlCssMetaData、getEllipsisString、getFont、getGraphic、getGraphicTextGap、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
computeMaxHeight、computeMaxWidth、computeMinHeight、computeMinWidth、computePrefHeight、computePrefWidth、contextMenuProperty、getBaselineOffset、getContextMenu、getCssMetaData、getSkin、getTooltip、isResizable、layoutChildren、setContextMenu、setSkin、setTooltip、skinProperty、tooltipProperty
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、snapSize、snapSpace、snapToPixelProperty、widthProperty
getChildren、getChildrenUnmodifiable、getManagedChildren、getStylesheets、isNeedsLayout、layout、lookup、needsLayoutProperty、requestLayout、requestParentLayout、setNeedsLayout、updateBounds
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、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、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、setVisible、snapshot、snapshot、startDragAndDrop、startFullDrag、styleProperty、toBack、toFront、translateXProperty、translateYProperty、translateZProperty、usesMirroring、visibleProperty
public final BooleanProperty indeterminateProperty
public final BooleanProperty selectedProperty
public final BooleanProperty allowIndeterminateProperty
true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。public CheckBox()
public CheckBox(String text)
text
- そのラベルのテキスト文字列。public final void setIndeterminate(boolean value)
public final boolean isIndeterminate()
public final BooleanProperty indeterminateProperty()
public final void setSelected(boolean value)
public final boolean isSelected()
public final BooleanProperty selectedProperty()
public final void setAllowIndeterminate(boolean value)
true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。public final boolean isAllowIndeterminate()
true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。public final BooleanProperty allowIndeterminateProperty()
true
の場合、3つのすべての状態が循環表示され、false
の場合は、checkedとuncheckedのみが循環表示されます。public void fire()
CheckBox
の状態を切り替えます。allowIndeterminateがtrueの場合は、この関数の各呼出しでCheckBoxは3つの状態(選択、選択解除および未定義)を循環表示します。allowIndeterminateがfalseの場合、CheckBoxは選択と選択解除の状態のみを循環表示し、不確定はfalseと同等になります。fire
、クラス: ButtonBase
protected Skin<?> createDefaultSkin()
-fx-skin
を介してスキンが提供されていない場合にコントロール用のスキンを作成するために、またはsetSkin(...)
を使用してサブクラスで明示的に設定するために呼び出されます。createDefaultSkin
、クラス: Control
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
queryAccessibleAttribute
、クラス: Control
attribute
- リクエストされた属性parameters
- オプションのパラメータ・リストAccessibleAttribute
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.