本文整理匯總了Java中javafx.scene.Group.setOpacity方法的典型用法代碼示例。如果您正苦於以下問題:Java Group.setOpacity方法的具體用法?Java Group.setOpacity怎麽用?Java Group.setOpacity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.Group
的用法示例。
在下文中一共展示了Group.setOpacity方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initializeLocationTypeIndicatorArrows
import javafx.scene.Group; //導入方法依賴的package包/類
private void initializeLocationTypeIndicatorArrows() {
// Initial indicator
final Group initialLocationGuideContainer = controller.initialLocationGuideContainer;
final Path initialLocationGuideArrow = controller.initialLocationGuideArrow;
final Label initialLocationGuideLabel = controller.initialLocationGuideLabel;
drawIndicatorArrow(initialLocationGuideArrow);
initialLocationGuideContainer.setRotate(-45-90);
initialLocationGuideContainer.setTranslateX(2.3 * GRID_SIZE);
initialLocationGuideContainer.setTranslateY(3.8 * GRID_SIZE);
initialLocationGuideLabel.setRotate(180);
initialLocationGuideLabel.setTranslateY(10.5);
initialLocationGuideContainer.toFront();
initialLocationGuideContainer.setOpacity(0);
// Final indicator
final Group finalLocationGuideContainer = controller.finalLocationGuideContainer;
final Path finalLocationGuideArrow = controller.finalLocationGuideArrow;
final Label finalLocationGuideLabel = controller.finalLocationGuideLabel;
drawIndicatorArrow(finalLocationGuideArrow);
finalLocationGuideContainer.setRotate(45);
finalLocationGuideContainer.setTranslateX(-2.3 * GRID_SIZE);
finalLocationGuideContainer.setTranslateY(-3.8 * GRID_SIZE);
finalLocationGuideLabel.setTranslateY(10.5);
finalLocationGuideContainer.toFront();
finalLocationGuideContainer.setOpacity(0);
if (!controller.getComponent().isFirsTimeShown()) {
initialLocationGuideContainer.setOpacity(1);
finalLocationGuideContainer.setOpacity(1);
playIndicatorAnimations(Location.Type.INITIAL, initialLocationGuideContainer);
playIndicatorAnimations(Location.Type.FINAl, finalLocationGuideContainer);
controller.getComponent().setFirsTimeShown(true);
}
}