Module  javafx.controls

Class DateCellSkin

    • 构造方法详细信息

      • DateCellSkin

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

      • dispose

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

        protected void updateChildren​()
        更新由LabeledSkinBase管理的子项,LabeledSkinBase可以是Labeled图形和/或Text节点。 仅使用实际必须使用的那些节点。 例如,使用GRAPHIC_ONLY的ContentDisplay不添加文本节点,并且使用TEXT_ONLY的ContentDisplay,不会添加图形。
        重写:
        updateChildrenLabeledSkinBase<DateCell>
      • layoutChildren

        protected void layoutChildren​(double x,
                                      double y,
                                      double w,
                                      double h)
        布局算法的工作原理如下: - 获取标签的w / h,图形w / h,文本w / h - 基于graphicVPos,graphicHPos,graphicTextGap和图形w / h和文本w / h - (请注意,文本内容已经在必要时被预截取) - 基于内容w / h计算内容x / y并标记为w / h,标记的hpos和vpos定位图形和文本
        重写:
        layoutChildrenLabeledSkinBase<DateCell>
        参数
        x - x位置
        y - y位置
        w - 宽度
        h - 高度
      • computePrefWidth

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

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