本文整理汇总了Java中javafx.geometry.Insets.getLeft方法的典型用法代码示例。如果您正苦于以下问题:Java Insets.getLeft方法的具体用法?Java Insets.getLeft怎么用?Java Insets.getLeft使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.geometry.Insets
的用法示例。
在下文中一共展示了Insets.getLeft方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}
示例3: updateLayout
import javafx.geometry.Insets; //导入方法依赖的package包/类
private void updateLayout() {
final DayPage page = getSkinnable();
switch (page.getDayPageLayout()) {
case STANDARD:
final Insets insets = page.getInsets();
if (page.getWidth() - insets.getLeft() - insets.getRight() < leftSide.prefWidth(-1) + rightSide.prefWidth(-1)) {
leftSide.setVisible(false);
rightSide.setVisible(true);
leftColumn.setPercentWidth(0);
rightColumn.setPercentWidth(100);
} else {
leftSide.setVisible(true);
rightSide.setVisible(true);
leftColumn.setPercentWidth(50);
rightColumn.setPercentWidth(50);
}
break;
case AGENDA_ONLY:
leftSide.setVisible(true);
rightSide.setVisible(false);
leftColumn.setPercentWidth(100);
rightColumn.setPercentWidth(0);
break;
case DAY_ONLY:
leftSide.setVisible(false);
rightSide.setVisible(true);
leftColumn.setPercentWidth(0);
rightColumn.setPercentWidth(100);
break;
}
}