modules/javafx.controls/src/main/java/javafx/scene/control/skin/DateCellSkin.java

Print this page

        

*** 114,141 **** Text secondaryText = (Text)getSkinnable().getProperties().get("DateCell.secondaryText"); if (secondaryText != null) { // Place the secondary Text node at BOTTOM_RIGHT. double textX = x + w - rightLabelPadding() - secondaryText.getLayoutBounds().getWidth(); double textY = y + h - bottomLabelPadding() - secondaryText.getLayoutBounds().getHeight(); ! secondaryText.relocate(snapPosition(textX), snapPosition(textY)); } } /** {@inheritDoc} */ @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { double pref = super.computePrefWidth(height, topInset, rightInset, bottomInset, leftInset); ! return snapSize(Math.max(pref, cellSize())); } /** {@inheritDoc} */ @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { double pref = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset); ! return snapSize(Math.max(pref, cellSize())); } /*************************************************************************** --- 114,141 ---- Text secondaryText = (Text)getSkinnable().getProperties().get("DateCell.secondaryText"); if (secondaryText != null) { // Place the secondary Text node at BOTTOM_RIGHT. double textX = x + w - rightLabelPadding() - secondaryText.getLayoutBounds().getWidth(); double textY = y + h - bottomLabelPadding() - secondaryText.getLayoutBounds().getHeight(); ! secondaryText.relocate(snapPositionX(textX), snapPositionY(textY)); } } /** {@inheritDoc} */ @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { double pref = super.computePrefWidth(height, topInset, rightInset, bottomInset, leftInset); ! return snapSizeX(Math.max(pref, cellSize())); } /** {@inheritDoc} */ @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { double pref = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset); ! return snapSizeY(Math.max(pref, cellSize())); } /***************************************************************************