Module  javafx.controls

Class ToolBarSkin

    • 构造方法详细信息

      • ToolBarSkin

        public ToolBarSkin​(ToolBar control)
        创建一个新的ToolBarSkin实例,将必需的子节点安装到控件 children列表中,以及处理键,鼠标等事件的必要输入映射。
        参数
        control - 这个皮肤应该安装到的控件。
    • 方法详细信息

      • dispose

        public void dispose​()
        当Skinnable更换皮肤时,由Skinnable调用。 该方法允许皮肤在不再需要皮肤后,实现任何必要的清理功能。 它可能用于释放本机资源。 方法Skin.getSkinnable()Skin.getNode()应在调用处理后返回null。 呼叫处理两次无效。
        Specified by:
        dispose在接口 Skin<ToolBar>
        重写:
        disposeSkinBase<ToolBar>
      • computeMinWidth

        protected double computeMinWidth​(double height,
                                         double topInset,
                                         double rightInset,
                                         double bottomInset,
                                         double leftInset)
        根据提供的高度计算皮肤的最小允许宽度。
        重写:
        computeMinWidthSkinBase<ToolBar>
        参数
        height - 皮肤的高度,以防该值可能决定最小宽度。
        topInset - 像素拍摄顶部插图
        rightInset - 像素拍摄正确的插图
        bottomInset - 像素攫取底部插图
        leftInset - 像素拍摄左边插图
        结果
        表示此皮肤最小宽度的双倍。
      • computeMinHeight

        protected double computeMinHeight​(double width,
                                          double topInset,
                                          double rightInset,
                                          double bottomInset,
                                          double leftInset)
        根据提供的宽度计算皮肤的最小允许高度。
        重写:
        computeMinHeightSkinBase<ToolBar>
        参数
        width - 皮肤的宽度,以防该值可能决定最小高度。
        topInset - 像素拍摄顶部插图
        rightInset - 像素拍摄正确的插图
        bottomInset - 像素啪嗒的底部插图
        leftInset - 像素拍摄左边插图
        结果
        一个双倍代表这个皮肤的最小高度。
      • computePrefWidth

        protected double computePrefWidth​(double height,
                                          double topInset,
                                          double rightInset,
                                          double bottomInset,
                                          double leftInset)
        计算这个SkinBase的首选宽度。 默认实现将这个宽度计算为被管理子对象以其首选宽度位于其当前位置时占用的区域的宽度。
        重写:
        computePrefWidthSkinBase<ToolBar>
        参数
        height - 如果首选宽度取决于应该使用的高度
        topInset - 像素拍摄顶部插图
        rightInset - 像素拍摄正确的插图
        bottomInset - 像素捕捉底部插图
        leftInset - 像素拍摄左边插图
        结果
        计算的优选宽度
      • computePrefHeight

        protected double computePrefHeight​(double width,
                                           double topInset,
                                           double rightInset,
                                           double bottomInset,
                                           double leftInset)
        计算这个SkinBase的首选高度。 默认实现将此高度计算为被管理儿童以其首选高度位于其当前位置时占用的区域的高度。
        重写:
        computePrefHeightSkinBase<ToolBar>
        参数
        width - 如果首选的高度取决于应该使用的宽度
        topInset - 像素拍摄的顶部插图
        rightInset - 像素拍摄正确的插图
        bottomInset - 像素攫取底部插图
        leftInset - 像素拍摄左边插图
        结果
        计算的优选高度
      • computeMaxWidth

        protected double computeMaxWidth​(double height,
                                         double topInset,
                                         double rightInset,
                                         double bottomInset,
                                         double leftInset)
        根据提供的高度计算皮肤的最大允许宽度。
        重写:
        computeMaxWidthSkinBase<ToolBar>
        参数
        height - 皮肤的高度,以防该值可能决定最大宽度。
        topInset - 像素拍摄顶部插图
        rightInset - 像素拍摄正确的插图
        bottomInset - 像素啪嗒的底部插入
        leftInset - 像素拍摄左边插图
        结果
        双倍表示此皮肤的最大宽度。
      • computeMaxHeight

        protected double computeMaxHeight​(double width,
                                          double topInset,
                                          double rightInset,
                                          double bottomInset,
                                          double leftInset)
        根据提供的宽度计算皮肤的最大允许高度。
        重写:
        computeMaxHeightSkinBase<ToolBar>
        参数
        width - 皮肤的宽度,以防该值可能决定最大高度。
        topInset - 像素拍摄的顶部插图
        rightInset - 像素拍摄正确的插图
        bottomInset - 像素啪嗒的底部插图
        leftInset - 像素拍摄左边插图
        结果
        一个双倍代表这个皮肤的最大高度。
      • layoutChildren

        protected void layoutChildren​(double x,
                                      double y,
                                      double w,
                                      double h)
        在场景图的布局过程中调用。
        重写:
        layoutChildrenSkinBase<ToolBar>
        参数
        x - x位置
        y - y位置
        w - 宽度
        h - 高度
      • getClassCssMetaData

        public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData​()
        返回与此类相关联的CssMetaData,其可以包括其超类的CssMetaData。
        结果
        与此类相关联的CssMetaData,其可以包括其超类的CssMetaData