- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.image.ImageView
-
- すべての実装されたインタフェース:
Styleable,EventTarget
@DefaultProperty("image") public class ImageView extends Node
ImageViewは、Imageクラスでロードされたイメージを描画するために使用するNodeです。このクラスでは、表示されるイメージのサイズ変更(元の縦横比を維持することも、しないことも可能)と、この
ImageViewで表示されるピクセルを制限するためのソース・イメージに対するビューポートの指定が可能です。イメージを表示するためのコードの例
import javafx.application.Application; import javafx.geometry.Rectangle2D; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; import javafx.scene.paint.Color; import javafx.stage.Stage; public class HelloImageView extends Application { @Override public void start(Stage stage) { // load the image Image image = new Image("flower.png"); // simple displays ImageView the image as is ImageView iv1 = new ImageView(); iv1.setImage(image); // resizes the image to have width of 100 while preserving the ratio and using // higher quality filtering method; this ImageView is also cached to // improve performance ImageView iv2 = new ImageView(); iv2.setImage(image); iv2.setFitWidth(100); iv2.setPreserveRatio(true); iv2.setSmooth(true); iv2.setCache(true); // defines a viewport into the source image (achieving a "zoom" effect) and // displays it rotated ImageView iv3 = new ImageView(); iv3.setImage(image); Rectangle2D viewportRect = new Rectangle2D(40, 35, 110, 110); iv3.setViewport(viewportRect); iv3.setRotate(90); Group root = new Group(); Scene scene = new Scene(root); scene.setFill(Color.BLACK); HBox box = new HBox(); box.getChildren().add(iv1); box.getChildren().add(iv2); box.getChildren().add(iv3); root.getChildren().add(box); stage.setTitle("ImageView"); stage.setWidth(415); stage.setHeight(200); stage.setScene(scene); stage.sizeToScene(); stage.show(); } public static void main(String[] args) { Application.launch(args); } }前述のコードにより、次の出力が生成されます。
- 導入されたバージョン:
- JavaFX 2.0
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 DoublePropertyfitHeight境界ボックスの高さ(これに合せて必要なだけソース・イメージのサイズを変更)。DoublePropertyfitWidth境界ボックスの幅(これに合せて必要なだけソース・イメージのサイズを変更)。ObjectProperty<Image>imageこのImageViewによって描画されるImage。BooleanPropertypreserveRatio調整境界ボックス内でイメージが適合するようにスケーリングするときに、ソース・イメージの縦横比を維持するかどうかを示します。BooleanPropertysmoothfitWidthとfitHeightで指定した境界ボックス内に収まるようにソース・イメージを変換する際またはスケーリングする際に、より高品質なフィルタリング・アルゴリズムまたは高速なアルゴリズムを使用するかどうかを示します。ObjectProperty<Rectangle2D>viewportイメージに対する矩形ビューポート。DoublePropertyxImageViewの原点の現在のx座標。DoublePropertyyImageViewの原点の現在のy座標。-
クラス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
-
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 static booleanSMOOTH_DEFAULTsmoothプロパティのプラットフォームに依存するデフォルト値。-
クラスjavafx.scene.Nodeから継承されたフィールド
BASELINE_OFFSET_SAME_AS_HEIGHT
-
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 DoublePropertyfitHeightProperty()境界ボックスの高さ(これに合せて必要なだけソース・イメージのサイズを変更)。DoublePropertyfitWidthProperty()境界ボックスの幅(これに合せて必要なだけソース・イメージのサイズを変更)。static List<CssMetaData<? extends Styleable,?>>getClassCssMetaData()List<CssMetaData<? extends Styleable,?>>getCssMetaData()NodeのCssMetaDataがリフレクションなしでアクセス可能になるように、このメソッドはNode.getClassCssMetaData()に委任する必要があります。doublegetFitHeight()プロパティfitHeightの値を取得します。doublegetFitWidth()プロパティfitWidthの値を取得します。ImagegetImage()プロパティimageの値を取得します。Rectangle2DgetViewport()プロパティviewportの値を取得します。doublegetX()プロパティxの値を取得します。doublegetY()プロパティyの値を取得します。ObjectProperty<Image>imageProperty()このImageViewによって描画されるImage。booleanisPreserveRatio()プロパティpreserveRatioの値を取得します。booleanisSmooth()プロパティsmoothの値を取得します。BooleanPropertypreserveRatioProperty()調整境界ボックス内でイメージが適合するようにスケーリングするときに、ソース・イメージの縦横比を維持するかどうかを示します。voidsetFitHeight(double value)プロパティfitHeightの値を設定します。voidsetFitWidth(double value)プロパティfitWidthの値を設定します。voidsetImage(Image value)プロパティimageの値を設定します。voidsetPreserveRatio(boolean value)プロパティpreserveRatioの値を設定します。voidsetSmooth(boolean value)プロパティsmoothの値を設定します。voidsetViewport(Rectangle2D value)プロパティviewportの値を設定します。voidsetX(double value)プロパティxの値を設定します。voidsetY(double value)プロパティyの値を設定します。BooleanPropertysmoothProperty()fitWidthとfitHeightで指定した境界ボックス内に収まるようにソース・イメージを変換する際またはスケーリングする際に、より高品質なフィルタリング・アルゴリズムまたは高速なアルゴリズムを使用するかどうかを示します。ObjectProperty<Rectangle2D>viewportProperty()イメージに対する矩形ビューポート。DoublePropertyxProperty()ImageViewの原点の現在のx座標。DoublePropertyyProperty()ImageViewの原点の現在のy座標。-
クラス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, getBaselineOffset, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, 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, isResizable, 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, maxHeight, maxWidth, minHeight, minWidth, 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, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, 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.css.Styleableから継承されたメソッド
getStyleableNode
-
-
-
-
プロパティの詳細
-
image
public final ObjectProperty<Image> imageProperty
このImageViewによって描画されるImage。- デフォルト値:
- null
- 関連項目:
getImage()、setImage(Image)
-
x
public final DoubleProperty xProperty
ImageViewの原点の現在のx座標。- デフォルト値:
- 0
- 関連項目:
getX()、setX(double)
-
y
public final DoubleProperty yProperty
ImageViewの原点の現在のy座標。- デフォルト値:
- 0
- 関連項目:
getY()、setY(double)
-
fitWidth
public final DoubleProperty fitWidthProperty
境界ボックスの幅(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの本来の幅がfitWidthとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。- デフォルト値:
- 0
- 関連項目:
getFitWidth()、setFitWidth(double)
-
fitHeight
public final DoubleProperty fitHeightProperty
境界ボックスの高さ(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの内在する高さがfitHeightとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。- デフォルト値:
- 0
- 関連項目:
getFitHeight()、setFitHeight(double)
-
preserveRatio
public final BooleanProperty preserveRatioProperty
調整境界ボックス内でイメージが適合するようにスケーリングするときに、ソース・イメージの縦横比を維持するかどうかを示します。trueに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、比率を維持するように高さがスケーリングされます。fitHeightのみが設定されている場合、比率を維持するように幅がスケーリングされます。- 両方が設定されている場合、元の縦横比を維持しながら、width x heightの矩形に対して最適になるように、それらの両方がスケーリングされることがあります。
falseに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、イメージのビューの幅が一致するようにスケーリングされ、高さは変更されません。fitHeightのみが設定されている場合、イメージのビューの高さが一致するようにスケーリングされ、高さは変更されません。- 両方が設定されている場合、両方が一致するようにイメージ・ビューがスケーリングされます。
fitWidth x fitHeight境界ボックス内に含まれることが保証されます。- デフォルト値:
- false
- 関連項目:
isPreserveRatio()、setPreserveRatio(boolean)
-
smooth
public final BooleanProperty smoothProperty
fitWidthとfitHeightで指定した境界ボックス内に収まるようにソース・イメージを変換する際またはスケーリングする際に、より高品質なフィルタリング・アルゴリズムまたは高速なアルゴリズムを使用するかどうかを示します。trueに設定されている場合は、より高品質なフィルタリングが使用され、falseに設定されている場合は、より高速ですが比較的低品質なフィルタリングが使用されます。デフォルト値はプラットフォーム構成によって異なります。
- デフォルト値:
- プラットフォームに依存
- 関連項目:
isSmooth()、setSmooth(boolean)
-
viewport
public final ObjectProperty<Rectangle2D> viewportProperty
イメージに対する矩形ビューポート。 ビューポートは、スケーリングまたはその他の変換の前に、イメージの座標で指定されます。viewportがnullの場合は、イメージ全体が表示されます。viewportがnull以外の場合は、ビューポート内に収まるイメージの一部のみが表示されます。 イメージがビューポートを完全にカバーしていない場合は、ビューポートの残りの領域が空になります。- デフォルト値:
- null
- 関連項目:
getViewport()、setViewport(Rectangle2D)
-
-
フィールドの詳細
-
SMOOTH_DEFAULT
public static final boolean SMOOTH_DEFAULT
smoothプロパティのプラットフォームに依存するデフォルト値。
-
-
コンストラクタの詳細
-
ImageView
public ImageView()
新しいImageViewオブジェクトを割り当てます。
-
ImageView
public ImageView(String url)
指定されたURLからロードされるイメージを使用して新しいImageViewオブジェクトを割り当てます。new ImageView(url)は、new ImageView(new Image(url))と同じ効果を持ちます。- パラメータ:
url- イメージのロード元のURLを表す文字列- 例外:
NullPointerException- URLがnullの場合IllegalArgumentException- URLが無効かサポートされていない場合- 導入されたバージョン:
- JavaFX 2.1
-
ImageView
public ImageView(Image image)
指定されたイメージを使用して新しいImageViewオブジェクトを割り当てます。- パラメータ:
image- このImageViewが使用するイメージ
-
-
メソッドの詳細
-
setImage
public final void setImage(Image value)
プロパティimageの値を設定します。- プロパティの説明:
- この
ImageViewによって描画されるImage。 - デフォルト値:
- null
-
getImage
public final Image getImage()
プロパティimageの値を取得します。- プロパティの説明:
- この
ImageViewによって描画されるImage。 - デフォルト値:
- null
-
imageProperty
public final ObjectProperty<Image> imageProperty()
このImageViewによって描画されるImage。- デフォルト値:
- null
- 関連項目:
getImage()、setImage(Image)
-
setX
public final void setX(double value)
プロパティxの値を設定します。- プロパティの説明:
ImageViewの原点の現在のx座標。- デフォルト値:
- 0
-
getX
public final double getX()
プロパティxの値を取得します。- プロパティの説明:
ImageViewの原点の現在のx座標。- デフォルト値:
- 0
-
xProperty
public final DoubleProperty xProperty()
ImageViewの原点の現在のx座標。- デフォルト値:
- 0
- 関連項目:
getX()、setX(double)
-
setY
public final void setY(double value)
プロパティyの値を設定します。- プロパティの説明:
ImageViewの原点の現在のy座標。- デフォルト値:
- 0
-
getY
public final double getY()
プロパティyの値を取得します。- プロパティの説明:
ImageViewの原点の現在のy座標。- デフォルト値:
- 0
-
yProperty
public final DoubleProperty yProperty()
ImageViewの原点の現在のy座標。- デフォルト値:
- 0
- 関連項目:
getY()、setY(double)
-
setFitWidth
public final void setFitWidth(double value)
プロパティfitWidthの値を設定します。- プロパティの説明:
- 境界ボックスの幅(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの本来の幅が
fitWidthとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。 - デフォルト値:
- 0
-
getFitWidth
public final double getFitWidth()
プロパティfitWidthの値を取得します。- プロパティの説明:
- 境界ボックスの幅(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの本来の幅が
fitWidthとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。 - デフォルト値:
- 0
-
fitWidthProperty
public final DoubleProperty fitWidthProperty()
境界ボックスの幅(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの本来の幅がfitWidthとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。- デフォルト値:
- 0
- 関連項目:
getFitWidth()、setFitWidth(double)
-
setFitHeight
public final void setFitHeight(double value)
プロパティfitHeightの値を設定します。- プロパティの説明:
- 境界ボックスの高さ(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの内在する高さが
fitHeightとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。 - デフォルト値:
- 0
-
getFitHeight
public final double getFitHeight()
プロパティfitHeightの値を取得します。- プロパティの説明:
- 境界ボックスの高さ(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの内在する高さが
fitHeightとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。 - デフォルト値:
- 0
-
fitHeightProperty
public final DoubleProperty fitHeightProperty()
境界ボックスの高さ(これに合せて必要なだけソース・イメージのサイズを変更)。 値<= 0に設定すると、イメージの内在する高さがfitHeightとして使用されます。イメージ・ビューの
fitWidth、fitHeightおよびpreserveRatio属性の間の通信の詳細は、preserveRatioを参照してください。- デフォルト値:
- 0
- 関連項目:
getFitHeight()、setFitHeight(double)
-
setPreserveRatio
public final void setPreserveRatio(boolean value)
プロパティpreserveRatioの値を設定します。- プロパティの説明:
- 調整境界ボックス内でイメージが適合するようにスケーリングするときに、ソース・イメージの縦横比を維持するかどうかを示します。
trueに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、比率を維持するように高さがスケーリングされます。fitHeightのみが設定されている場合、比率を維持するように幅がスケーリングされます。- 両方が設定されている場合、元の縦横比を維持しながら、width x heightの矩形に対して最適になるように、それらの両方がスケーリングされることがあります。
falseに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、イメージのビューの幅が一致するようにスケーリングされ、高さは変更されません。fitHeightのみが設定されている場合、イメージのビューの高さが一致するようにスケーリングされ、高さは変更されません。- 両方が設定されている場合、両方が一致するようにイメージ・ビューがスケーリングされます。
fitWidth x fitHeight境界ボックス内に含まれることが保証されます。 - デフォルト値:
- false
-
isPreserveRatio
public final boolean isPreserveRatio()
プロパティpreserveRatioの値を取得します。- プロパティの説明:
- 調整境界ボックス内でイメージが適合するようにスケーリングするときに、ソース・イメージの縦横比を維持するかどうかを示します。
trueに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、比率を維持するように高さがスケーリングされます。fitHeightのみが設定されている場合、比率を維持するように幅がスケーリングされます。- 両方が設定されている場合、元の縦横比を維持しながら、width x heightの矩形に対して最適になるように、それらの両方がスケーリングされることがあります。
falseに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、イメージのビューの幅が一致するようにスケーリングされ、高さは変更されません。fitHeightのみが設定されている場合、イメージのビューの高さが一致するようにスケーリングされ、高さは変更されません。- 両方が設定されている場合、両方が一致するようにイメージ・ビューがスケーリングされます。
fitWidth x fitHeight境界ボックス内に含まれることが保証されます。 - デフォルト値:
- false
-
preserveRatioProperty
public final BooleanProperty preserveRatioProperty()
調整境界ボックス内でイメージが適合するようにスケーリングするときに、ソース・イメージの縦横比を維持するかどうかを示します。trueに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、比率を維持するように高さがスケーリングされます。fitHeightのみが設定されている場合、比率を維持するように幅がスケーリングされます。- 両方が設定されている場合、元の縦横比を維持しながら、width x heightの矩形に対して最適になるように、それらの両方がスケーリングされることがあります。
falseに設定されている場合は、このImageViewのディメンションに、次のように影響します。*fitWidthのみが設定されている場合、イメージのビューの幅が一致するようにスケーリングされ、高さは変更されません。fitHeightのみが設定されている場合、イメージのビューの高さが一致するようにスケーリングされ、高さは変更されません。- 両方が設定されている場合、両方が一致するようにイメージ・ビューがスケーリングされます。
fitWidth x fitHeight境界ボックス内に含まれることが保証されます。- デフォルト値:
- false
- 関連項目:
isPreserveRatio()、setPreserveRatio(boolean)
-
setSmooth
public final void setSmooth(boolean value)
プロパティsmoothの値を設定します。- プロパティの説明:
fitWidthとfitHeightで指定した境界ボックス内に収まるようにソース・イメージを変換する際またはスケーリングする際に、より高品質なフィルタリング・アルゴリズムまたは高速なアルゴリズムを使用するかどうかを示します。trueに設定されている場合は、より高品質なフィルタリングが使用され、falseに設定されている場合は、より高速ですが比較的低品質なフィルタリングが使用されます。デフォルト値はプラットフォーム構成によって異なります。
- デフォルト値:
- プラットフォームに依存
-
isSmooth
public final boolean isSmooth()
プロパティsmoothの値を取得します。- プロパティの説明:
fitWidthとfitHeightで指定した境界ボックス内に収まるようにソース・イメージを変換する際またはスケーリングする際に、より高品質なフィルタリング・アルゴリズムまたは高速なアルゴリズムを使用するかどうかを示します。trueに設定されている場合は、より高品質なフィルタリングが使用され、falseに設定されている場合は、より高速ですが比較的低品質なフィルタリングが使用されます。デフォルト値はプラットフォーム構成によって異なります。
- デフォルト値:
- プラットフォームに依存
-
smoothProperty
public final BooleanProperty smoothProperty()
fitWidthとfitHeightで指定した境界ボックス内に収まるようにソース・イメージを変換する際またはスケーリングする際に、より高品質なフィルタリング・アルゴリズムまたは高速なアルゴリズムを使用するかどうかを示します。trueに設定されている場合は、より高品質なフィルタリングが使用され、falseに設定されている場合は、より高速ですが比較的低品質なフィルタリングが使用されます。デフォルト値はプラットフォーム構成によって異なります。
- デフォルト値:
- プラットフォームに依存
- 関連項目:
isSmooth()、setSmooth(boolean)
-
setViewport
public final void setViewport(Rectangle2D value)
プロパティviewportの値を設定します。- プロパティの説明:
- イメージに対する矩形ビューポート。 ビューポートは、スケーリングまたはその他の変換の前に、イメージの座標で指定されます。
viewportがnullの場合は、イメージ全体が表示されます。viewportがnull以外の場合は、ビューポート内に収まるイメージの一部のみが表示されます。 イメージがビューポートを完全にカバーしていない場合は、ビューポートの残りの領域が空になります。 - デフォルト値:
- null
-
getViewport
public final Rectangle2D getViewport()
プロパティviewportの値を取得します。- プロパティの説明:
- イメージに対する矩形ビューポート。 ビューポートは、スケーリングまたはその他の変換の前に、イメージの座標で指定されます。
viewportがnullの場合は、イメージ全体が表示されます。viewportがnull以外の場合は、ビューポート内に収まるイメージの一部のみが表示されます。 イメージがビューポートを完全にカバーしていない場合は、ビューポートの残りの領域が空になります。 - デフォルト値:
- null
-
viewportProperty
public final ObjectProperty<Rectangle2D> viewportProperty()
イメージに対する矩形ビューポート。 ビューポートは、スケーリングまたはその他の変換の前に、イメージの座標で指定されます。viewportがnullの場合は、イメージ全体が表示されます。viewportがnull以外の場合は、ビューポート内に収まるイメージの一部のみが表示されます。 イメージがビューポートを完全にカバーしていない場合は、ビューポートの残りの領域が空になります。- デフォルト値:
- null
- 関連項目:
getViewport()、setViewport(Rectangle2D)
-
getClassCssMetaData
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
- 戻り値:
- このクラスに関連付けられたCssMetaData。スーパークラスのCssMetaDataを含むことがあります。
- 導入されたバージョン:
- JavaFX 8.0
-
getCssMetaData
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
NodeのCssMetaDataがリフレクションなしでアクセス可能になるように、このメソッドはNode.getClassCssMetaData()に委任する必要があります。- 定義:
getCssMetaData、インタフェース:Styleable- オーバーライド:
getCssMetaData、クラス:Node- 戻り値:
- このクラスに関連付けられたCssMetaData。スーパークラスのCssMetaDataを含むことがあります。
- 導入されたバージョン:
- JavaFX 8.0
-
-