本文整理汇总了Java中javafx.geometry.Insets.getBottom方法的典型用法代码示例。如果您正苦于以下问题:Java Insets.getBottom方法的具体用法?Java Insets.getBottom怎么用?Java Insets.getBottom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.geometry.Insets
的用法示例。
在下文中一共展示了Insets.getBottom方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: layoutChildren
import javafx.geometry.Insets; //导入方法依赖的package包/类
@Override
protected void layoutChildren() {
Insets insets = getInsets();
double top = insets.getTop();
double bottom = insets.getBottom();
double left = insets.getLeft();
double right = insets.getRight();
double w = getWidth();
double h = getHeight();
double availableHeight = h - top - bottom;
double ps1 = dayOfMonthLabel.prefWidth(-1);
double ps2 = dayOfWeekLabel.prefWidth(-1);
double ps4 = counterLabel.prefWidth(-1);
double ph = counterLabel.prefHeight(-1);
dayOfMonthLabel.resizeRelocate(left, top, ps1, availableHeight);
dayOfWeekLabel.resizeRelocate(left + ps1, top, ps2, availableHeight);
// center the counter label, do not let it use the entire height
counterLabel.resizeRelocate(w - right - ps4, top + availableHeight / 2 - ph / 2, ps4, Math.min(availableHeight, ph));
}
示例2: computePrefHeight
import javafx.geometry.Insets; //导入方法依赖的package包/类
@Override
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
List<AllDayEntryView> entryViews = getChildren().stream().filter(node -> node instanceof AllDayEntryView).map(node -> (AllDayEntryView) node).collect(Collectors.toList());
List<Placement> placements = Resolver.resolve(entryViews);
int maxPosition = 0;
for (Placement p : placements) {
maxPosition = Math.max(maxPosition, p.getColumnIndex());
}
Insets insets = getSkinnable().getInsets();
Insets extraPadding = getSkinnable().getExtraPadding();
double rowHeight = getSkinnable().getRowHeight();
double rowSpacing = getSkinnable().getRowSpacing();
return (maxPosition + 1) * rowHeight + (maxPosition * rowSpacing) + insets.getTop() + insets.getBottom() * extraPadding.getTop() + extraPadding.getBottom();
}
示例3: layoutChildren
import javafx.geometry.Insets; //导入方法依赖的package包/类
@Override
protected void layoutChildren() {
Insets insets = getInsets();
double top = insets.getTop();
double bottom = insets.getBottom();
double left = insets.getLeft();
double right = insets.getRight();
double w = getWidth();
double h = getHeight();
double availableHeight = h - top - bottom;
double ps1 = dayOfMonthLabel.prefWidth(-1);
double ps2 = dayOfWeekLabel.prefWidth(-1);
double ps3 = icon.prefWidth(-1);
dayOfMonthLabel.resizeRelocate(left, top, ps1, availableHeight);
dayOfWeekLabel.resizeRelocate(left + ps1, top, ps2, availableHeight);
icon.resizeRelocate(w - right - ps3, (availableHeight - icon.prefHeight(-1)) / 2, ps3, availableHeight);
}
示例4: layoutChildren
import javafx.geometry.Insets; //导入方法依赖的package包/类
@Override
protected void layoutChildren() {
super.layoutChildren();
switch (dayView.getHoursLayoutStrategy()) {
case FIXED_HOUR_COUNT:
double height = getHeight();
int visibleHours = dayView.getVisibleHours();
dayView.setHourHeight(Math.max(1, height / visibleHours)); // height must be at least 1px
break;
case FIXED_HOUR_HEIGHT:
break;
}
Insets insets = getInsets();
final double ph = dayView.prefHeight(-1);
dayView.resizeRelocate(
snapPosition(insets.getLeft()),
snapPosition(insets.getTop()),
snapSize(getWidth() - insets.getLeft() - insets.getRight()),
snapSize(Math.max(ph, getHeight() - insets.getTop() - insets.getBottom())));
switch (dayView.getHoursLayoutStrategy()) {
case FIXED_HOUR_COUNT:
if (cachedStartTime != null) {
dayView.setTranslateY(-ViewHelper.getTimeLocation(dayView, cachedStartTime, true));
}
break;
case FIXED_HOUR_HEIGHT:
break;
}
if (dayView.getTranslateY() + dayView.getHeight() < getHeight() - insets.getTop() - insets.getBottom()) {
dayView.setTranslateY(getMaxTranslateY(insets));
}
}
示例5: getMaxTranslateY
import javafx.geometry.Insets; //导入方法依赖的package包/类
private double getMaxTranslateY(Insets insets) {
return (getHeight() - insets.getTop() - insets.getBottom()) - dayView.getHeight();
}