< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/control/skin/CheckBoxSkin.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 140,150 ****
final double computeWidth = Math.max(checkBox.prefWidth(-1), checkBox.minWidth(-1));
final double labelWidth = Math.min( computeWidth - boxWidth, w - snapSizeX(boxWidth));
final double labelHeight = Math.min(checkBox.prefHeight(labelWidth), h);
final double maxHeight = Math.max(boxHeight, labelHeight);
final double xOffset = Utils.computeXOffset(w, labelWidth + boxWidth, checkBox.getAlignment().getHpos()) + x;
! final double yOffset = Utils.computeYOffset(h, maxHeight, checkBox.getAlignment().getVpos()) + x;
layoutLabelInArea(xOffset + boxWidth, yOffset, labelWidth, maxHeight, checkBox.getAlignment());
box.resize(boxWidth, boxHeight);
positionInArea(box, xOffset, yOffset, boxWidth, maxHeight, 0, checkBox.getAlignment().getHpos(), checkBox.getAlignment().getVpos());
}
--- 140,150 ----
final double computeWidth = Math.max(checkBox.prefWidth(-1), checkBox.minWidth(-1));
final double labelWidth = Math.min( computeWidth - boxWidth, w - snapSizeX(boxWidth));
final double labelHeight = Math.min(checkBox.prefHeight(labelWidth), h);
final double maxHeight = Math.max(boxHeight, labelHeight);
final double xOffset = Utils.computeXOffset(w, labelWidth + boxWidth, checkBox.getAlignment().getHpos()) + x;
! final double yOffset = Utils.computeYOffset(h, maxHeight, checkBox.getAlignment().getVpos()) + y;
layoutLabelInArea(xOffset + boxWidth, yOffset, labelWidth, maxHeight, checkBox.getAlignment());
box.resize(boxWidth, boxHeight);
positionInArea(box, xOffset, yOffset, boxWidth, maxHeight, 0, checkBox.getAlignment().getHpos(), checkBox.getAlignment().getVpos());
}
< prev index next >