本文整理汇总了Java中javafx.scene.shape.Rectangle.setY方法的典型用法代码示例。如果您正苦于以下问题:Java Rectangle.setY方法的具体用法?Java Rectangle.setY怎么用?Java Rectangle.setY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.shape.Rectangle
的用法示例。
在下文中一共展示了Rectangle.setY方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: adjust_rectangle_properties
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
void adjust_rectangle_properties(double starting_point_x, double starting_point_y, double ending_point_x,
double ending_point_y, Rectangle given_rectangle) {
given_rectangle.setX(starting_point_x);
given_rectangle.setY(starting_point_y);
given_rectangle.setWidth(ending_point_x - starting_point_x);
given_rectangle.setHeight(ending_point_y - starting_point_y);
if (given_rectangle.getWidth() < 0) {
given_rectangle.setWidth(-given_rectangle.getWidth());
given_rectangle.setX(given_rectangle.getX() - given_rectangle.getWidth());
}
if (given_rectangle.getHeight() < 0) {
given_rectangle.setHeight(-given_rectangle.getHeight());
given_rectangle.setY(given_rectangle.getY() - given_rectangle.getHeight());
}
}
示例2: createRectangles
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
private void createRectangles(){
top = new Rectangle();
body = new Rectangle();
changeHeight(getRefNode().getHeight());
changeWidth(getRefNode().getWidth());
top.setX(getRefNode().getX());
top.setY(getRefNode().getY());
top.setFill(Color.LIGHTSKYBLUE);
top.setStroke(Color.BLACK);
body.setX(getRefNode().getX());
body.setY(getRefNode().getY() + top.getHeight());
body.setFill(Color.LIGHTSKYBLUE);
body.setStroke(Color.BLACK);
}
示例3: start
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
Group root = new Group();
Scene scene = new Scene(root, Color.BLACK);
primaryStage.setScene(scene);
Group squares = new Group();
int SPACING = 1;
for (int y = 0; y < HEIGHT; y += SIDE_SIZE + SPACING) {
for (int x = 0; x < WIDTH; x += SIDE_SIZE + SPACING) {
Rectangle square = new Rectangle(SIDE_SIZE, SIDE_SIZE, Color.web("brown"));
square.setX(x);
square.setY(y);
squares.getChildren().add(square);
}
}
root.getChildren().add(squares);
primaryStage.show();
}
示例4: onTouchPressed
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void onTouchPressed(TouchEvent event){
Rectangle dragRectangle = new Rectangle();
dragRectangle.setFill(null);
dragRectangle.setStroke(Color.BLACK);
if(event.getSource() instanceof AbstractNodeView){
dragRectangle.setX(event.getTouchPoint().getX() + ((AbstractNodeView) event.getSource()).getX());
dragRectangle.setY(event.getTouchPoint().getY() + ((AbstractNodeView) event.getSource()).getY());
dragStarts.put(event.getTouchPoint().getId(), new Point2D(
event.getTouchPoint().getX() + ((AbstractNodeView) event.getSource()).getX()
, event.getTouchPoint().getY() + ((AbstractNodeView) event.getSource()).getY()));
} else {
dragRectangle.setX(event.getTouchPoint().getX());
dragRectangle.setY(event.getTouchPoint().getY());
dragStarts.put(event.getTouchPoint().getId(), new Point2D(event.getTouchPoint().getX(), event.getTouchPoint().getY()));
}
dragRectangles.put(event.getTouchPoint().getId(), dragRectangle);
aDrawPane.getChildren().add(dragRectangle);
}
示例5: onTouchDragged
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void onTouchDragged(TouchEvent event){
Rectangle dragRectangle = dragRectangles.get(event.getTouchPoint().getId());
Point2D startPoint = dragStarts.get(event.getTouchPoint().getId());
if(event.getSource() instanceof AbstractNodeView){
dragRectangle.setWidth(Math.abs(((AbstractNodeView)event.getSource()).getX() + event.getTouchPoint().getX() - startPoint.getX()));
dragRectangle.setHeight(Math.abs(((AbstractNodeView)event.getSource()).getY() + event.getTouchPoint().getY() - startPoint.getY()));
dragRectangle.setX(Math.min(startPoint.getX(), ((AbstractNodeView)event.getSource()).getX() + event.getTouchPoint().getX()));
dragRectangle.setY(Math.min(startPoint.getY(), ((AbstractNodeView)event.getSource()).getY() + event.getTouchPoint().getY()));
} else {
dragRectangle.setWidth(Math.abs(startPoint.getX() - event.getTouchPoint().getX()));
dragRectangle.setHeight(Math.abs(startPoint.getY() - event.getTouchPoint().getY()));
dragRectangle.setX(Math.min(startPoint.getX(), event.getTouchPoint().getX()));
dragRectangle.setY(Math.min(startPoint.getY(), event.getTouchPoint().getY()));
}
}
示例6: onMousePressed
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void onMousePressed(MouseEvent event){
mouseDragRectangle = new Rectangle();
mouseDragRectangle.setFill(null);
mouseDragRectangle.setStroke(Color.BLACK);
aDrawPane.getChildren().add(mouseDragRectangle);
mouseDragStartX = event.getX();
mouseDragStartY = event.getY();
if(event.getSource() instanceof AbstractNodeView){
mouseDragRectangle.setX(((AbstractNodeView)event.getSource()).getX() + mouseDragStartX);
mouseDragRectangle.setY(((AbstractNodeView)event.getSource()).getY() + mouseDragStartY);
} else {
mouseDragRectangle.setX(event.getX());
mouseDragRectangle.setY(event.getY());
}
}
示例7: setFillImageKeepingAspectRatio
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void setFillImageKeepingAspectRatio(Rectangle rectangle, Image image, Dimension2D gamingContextDimension2D) {
double imageWidth = image.getWidth();
double imageHeight = image.getHeight();
double imageHeightToWidthRatio = imageHeight / imageWidth;
double initialHeight = rectangle.getHeight();
double initialWidth = initialHeight / imageHeightToWidthRatio;
double positionX = (gamingContextDimension2D.getWidth() - initialWidth) / 2;
double positionY = (gamingContextDimension2D.getHeight() - initialHeight) / 2;
rectangle.setFill(new ImagePattern(image));
rectangle.setX(positionX);
rectangle.setY(positionY);
rectangle.setWidth(initialWidth);
rectangle.setHeight(initialHeight);
rectangle.setTranslateX(0);
rectangle.setScaleX(1);
rectangle.setScaleY(1);
rectangle.setScaleZ(1);
}
示例8: NodePropertiesSample
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public NodePropertiesSample() {
super(300,100);
//X position of node = X + LayoutX + TranslateX
rectA = new Rectangle(50, 50, Color.LIGHTSALMON);
//set position of node temporary (can be changed after)
rectA.setTranslateX(10);
rectB = new Rectangle(50, 50, Color.LIGHTGREEN);
//set position of node when addinf to some layout
rectB.setLayoutX(20);
rectB.setLayoutY(10);
rectC = new Rectangle(50, 50, Color.DODGERBLUE);
//last posibility of setting X position of node
rectC.setX(30);
rectC.setY(20);
//opacity of node can be set
rectC.setOpacity(0.8);
// REMOVE ME
setControls(
new SimplePropertySheet.PropDesc("Rectangle A translate X", rectA.translateXProperty(), 0d, 50d),
new SimplePropertySheet.PropDesc("Rectangle B translate X", rectB.translateXProperty(), 0d, 50d),
new SimplePropertySheet.PropDesc("Rectangle C translate X", rectC.translateXProperty(), 0d, 50d),
new SimplePropertySheet.PropDesc("Rectangle A Opacity", rectA.opacityProperty(), 0d, 1d),
new SimplePropertySheet.PropDesc("Rectangle B Opacity", rectB.opacityProperty(), 0d, 1d),
new SimplePropertySheet.PropDesc("Rectangle C Opacity", rectC.opacityProperty(), 0d, 1d)
);
getChildren().add(createRadioButtons());
// END REMOVE ME
Group g = new Group(rectA, rectB, rectC);
g.setLayoutX(160 + 35);
getChildren().addAll(g);
}
示例9: start
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
Group root = new Group();
Scene scene = new Scene(root, Color.BLACK);
primaryStage.setScene(scene);
Group squares = new Group();
int SPACING = 1;
for (int y = 0; y < HEIGHT; y += SIDE_SIZE + SPACING) {
for (int x = 0; x < WIDTH; x += SIDE_SIZE + SPACING) {
String color;
if (Math.random() > 0.99) {
color = "brown";
} else {
color = "orange";
}
Rectangle square = new Rectangle(SIDE_SIZE, SIDE_SIZE, Color.web(color));
square.setX(x);
square.setY(y);
squares.getChildren().add(square);
}
}
root.getChildren().add(squares);
primaryStage.show();
}
示例10: draw
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void draw() {
// Draw elevator
Rectangle rgB = new Rectangle(WIDTH, HEIGHT);
rgB.setFill(Color.TRANSPARENT);
this.getChildren().add(rgB);
rgT = new Rectangle((WIDTH / 3) * 2 + (WIDTH / (WIDTH / 8)), HEIGHT / 1.5 + (HEIGHT / (HEIGHT / 4)));
rgT.setFill(Color.web("bfbfbf"));
rgT.setX(WIDTH / 2 - rgT.getWidth() / 2);
rgT.setY(HEIGHT - rgT.getHeight());
this.getChildren().add(rgT);
//Left side elevator shaft door
rgD1 = new Rectangle(WIDTH / 3, HEIGHT / 1.5);
rgD1.setFill(Color.web("a5a5a5"));
rgD1.setX(WIDTH / 2 - rgD1.getWidth());
rgD1.setY(HEIGHT - rgD1.getHeight());
this.getChildren().add(rgD1);
//Right side elevator shaft door
rgD2 = new Rectangle(WIDTH / 3, HEIGHT / 1.5);
rgD2.setFill(Color.web("a5a5a5"));
rgD2.setX(WIDTH / 2);
rgD2.setY(HEIGHT - rgD2.getHeight());
this.getChildren().add(rgD2);
// Draw text
tFloorNum = new Text(String.valueOf(FLOORNUM));
tFloorNum.setFill(Color.web("bfbfbf"));
tFloorNum.setFont(Font.font("Verdana", 20));
tFloorNum.setX(WIDTH / 2 - tFloorNum.getBoundsInParent().getWidth() / 2);
tFloorNum.setY(rgT.getY() - tFloorNum.getBoundsInParent().getHeight() / 2);
this.getChildren().add(tFloorNum);
}
示例11: draw
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void draw() {
// Background rectangle
Rectangle rgFlBg = new Rectangle(WIDTH, HEIGHT);
rgFlBg.setFill(Color.web("eaeaea"));
this.getChildren().add(rgFlBg);
// Draw trim
Rectangle rgFlTr = new Rectangle(WIDTH, (HEIGHT / (HEIGHT / 6)));
rgFlTr.setX(0);
rgFlTr.setY(HEIGHT - rgFlTr.getHeight());
rgFlTr.setFill(Color.web("323232"));
this.getChildren().add(rgFlTr);
// Draw floor
Rectangle rgFlFl = new Rectangle(WIDTH, (HEIGHT / (HEIGHT / 2)));
rgFlFl.setX(0);
rgFlFl.setY(HEIGHT - rgFlFl.getHeight());
rgFlFl.setFill(Color.web("646464"));
this.getChildren().add(rgFlFl);
// Create doors
for (int i = 0; i < doors.length; i++) {
// Get a random number to determine door state
int random = (int )(Math.random() * 3 + 1);
// Create a door
if (random == 1) {
doors[i] = new Door(WIDTHDOOR, HEIGHTDOOR, "closed");
} else if (random == 2) {
doors[i] = new Door(WIDTHDOOR, HEIGHTDOOR, "open");
} else {
doors[i] = new Door(WIDTHDOOR, HEIGHTDOOR, "half");
}
// Position door
doors[i].setTranslateX(((WIDTH + HEIGHT) / ((2.0/3.0) * 10) * i) + WIDTHDOOR);
doors[i].setTranslateY(HEIGHT - rgFlFl.getHeight() - HEIGHTDOOR);
// Add door to pane
this.getChildren().add(doors[i]);
}
// Elevator
elevator = new Elevator(WIDTH - ((WIDTHDOOR * 25 + HEIGHTDOOR * 1.75) / ((2.0/3.0) * 10)) * 5 - WIDTHDOOR, HEIGHT - 2, FLOORNUM, "closed");
elevator.setTranslateX(WIDTH - elevator.getBoundsInParent().getWidth());
this.getChildren().add(elevator);
}
示例12: drawOffice
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void drawOffice() { // Desk and cabinet
// Draw desk
Rectangle rgDT = new Rectangle(WIDTH / 3, HEIGHT / (HEIGHT / 4));
rgDT.setFill(Color.web("673232"));
gDesk.getChildren().add(rgDT);
Rectangle rgDM = new Rectangle(WIDTH / 4, rgDT.getHeight() * 6);
rgDM.setX(rgDT.getWidth() / 2 - rgDM.getWidth() / 2);
rgDM.setY(rgDT.getHeight());
rgDM.setFill(Color.web("4d2626"));
gDesk.getChildren().add(rgDM);
Rectangle rgDLL = new Rectangle(rgDM.getWidth() / 12, rgDM.getHeight() / 2);
rgDLL.setX((rgDT.getWidth() - rgDM.getWidth()) / 2);
rgDLL.setY(rgDT.getHeight() + rgDM.getHeight());
rgDLL.setFill(Color.web("4d2626"));
gDesk.getChildren().add(rgDLL);
Rectangle rgDLR = new Rectangle(rgDM.getWidth() / 12, rgDM.getHeight() / 2);
rgDLR.setX(rgDLL.getX() + rgDM.getWidth() - rgDLR.getWidth());
rgDLR.setY(rgDT.getHeight() + rgDM.getHeight());
rgDLR.setFill(Color.web("4d2626"));
gDesk.getChildren().add(rgDLR);
// Position desk
gDesk.setTranslateX(WIDTH - gDesk.getBoundsInParent().getWidth() * 2.25);
gDesk.setTranslateY(HEIGHT - gDesk.getBoundsInParent().getHeight());
this.getChildren().add(gDesk);
// Draw cabinet
Rectangle rgCM = new Rectangle(gDesk.getBoundsInParent().getWidth() / 3, gDesk.getBoundsInParent().getHeight());
rgCM.setX(gDesk.getBoundsInParent().getWidth() + gDesk.getTranslateX());
rgCM.setY(gDesk.getTranslateY());
rgCM.setFill(Color.web("bfbfbf"));
gCabinet.getChildren().add(rgCM);
Rectangle rgCDT = new Rectangle(rgCM.getWidth() - (WIDTH / (WIDTH / 4)), rgCM.getHeight() / 2.25);
rgCDT.setX(rgCM.getX() + (WIDTH / (WIDTH / 2)));
rgCDT.setY(rgCM.getY() + (rgCM.getHeight() / 2) - rgCDT.getHeight());
rgCDT.setFill(Color.web("a5a5a5"));
gCabinet.getChildren().add(rgCDT);
Rectangle rgCDB = new Rectangle(rgCM.getWidth() - (WIDTH / (WIDTH / 4)), rgCM.getHeight() / 2.25);
rgCDB.setX(rgCM.getX() + (WIDTH / (WIDTH / 2)));
rgCDB.setY(rgCM.getY() + (rgCM.getHeight() / 2));
rgCDB.setFill(Color.web("a5a5a5"));
gCabinet.getChildren().add(rgCDB);
Rectangle rgCDD = new Rectangle(rgCM.getWidth() - (WIDTH / (WIDTH / 4)), (HEIGHT / (HEIGHT / 2)));
rgCDD.setX(rgCM.getX() + (WIDTH / (WIDTH / 2)));
rgCDD.setY(rgCM.getY() + (rgCM.getHeight() / 2) - rgCDD.getHeight() / 2);
rgCDD.setFill(Color.web("bfbfbf"));
gCabinet.getChildren().add(rgCDD);
// Position cabinet
gDesk.setTranslateX(WIDTH - gDesk.getBoundsInParent().getWidth() * 2.25);
gDesk.setTranslateY(HEIGHT - gDesk.getBoundsInParent().getHeight());
this.getChildren().add(gCabinet);
}
示例13: drawRestroom
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void drawRestroom() { // Toilet and sink
// Draw toilet
Rectangle rgTL = new Rectangle(WIDTH / 8, (HEIGHT / (HEIGHT / 4)));
rgTL.setFill(Color.web("a5a5a5"));
gToilet.getChildren().add(rgTL);
Rectangle rgTT = new Rectangle(WIDTH / 10, HEIGHT / 10);
rgTT.setX(rgTL.getWidth() / 2 - rgTT.getWidth() / 2);
rgTT.setY(rgTL.getHeight());
rgTT.setFill(Color.web("bfbfbf"));
gToilet.getChildren().add(rgTT);
Polygon rgTB = new Polygon();
rgTB.getPoints().addAll(new Double[] {
rgTL.getWidth() * 0.05, rgTT.getY() + rgTT.getHeight(),
rgTL.getWidth() * 0.95, rgTT.getY() + rgTT.getHeight(),
rgTL.getWidth() * 0.85, rgTT.getY() + rgTT.getHeight() + rgTL.getHeight() * 3,
rgTL.getWidth() * 0.15, rgTT.getY() + rgTT.getHeight() + rgTL.getHeight() * 3,
});
rgTB.setFill(Color.web("bfbfbf"));
gToilet.getChildren().add(rgTB);
Rectangle rgTS = new Rectangle(rgTL.getWidth() / 2, rgTL.getHeight() * 2);
rgTS.setX(rgTL.getWidth() / 2 - rgTS.getWidth() / 2);
rgTS.setY(rgTB.getBoundsInParent().getMaxY());
rgTS.setFill(Color.web("bfbfbf"));
gToilet.getChildren().add(rgTS);
// Position toilet
gToilet.setTranslateX(WIDTH / 4);
gToilet.setTranslateY(HEIGHT - gToilet.getBoundsInParent().getHeight());
this.getChildren().add(gToilet);
// Draw sink
HBox hbSinkHandles = new HBox(WIDTH / (WIDTH / 4));
gSink.getChildren().add(hbSinkHandles);
Rectangle rgSHL = new Rectangle(WIDTH / (WIDTH / 4), HEIGHT / (HEIGHT / 8));
rgSHL.setFill(Color.web("7f7f7f"));
rgSHL.setTranslateY(2);
hbSinkHandles.getChildren().add(rgSHL);
Rectangle rgSHM = new Rectangle(WIDTH / (WIDTH / 4), HEIGHT / (HEIGHT / 12));
rgSHM.setFill(Color.web("7f7f7f"));
hbSinkHandles.getChildren().add(rgSHM);
Rectangle rgSHR = new Rectangle(WIDTH / (WIDTH / 4), HEIGHT / (HEIGHT / 8));
rgSHR.setFill(Color.web("7f7f7f"));
rgSHR.setTranslateY(2);
hbSinkHandles.getChildren().add(rgSHR);
Rectangle rgST = new Rectangle(WIDTH / 8, (HEIGHT / (HEIGHT / 8)));
rgST.setFill(Color.web("a5a5a5"));
gSink.getChildren().add(rgST);
Rectangle rgSS = new Rectangle(rgST.getWidth() / 2, rgST.getHeight() * 4);
rgSS.setX(rgST.getWidth() / 2 - rgSS.getWidth() / 2);
rgSS.setY(rgST.getY() + rgST.getHeight());
rgSS.setFill(Color.web("bfbfbf"));
gSink.getChildren().add(rgSS);
// Position sink
hbSinkHandles.setTranslateX(gSink.getBoundsInParent().getWidth() / 2 - (hbSinkHandles.getSpacing() * 5) / 2);
hbSinkHandles.setTranslateY(-HEIGHT / (HEIGHT / 8));
gSink.setTranslateX(WIDTH / 4 + gToilet.getBoundsInParent().getWidth() + (gSink.getBoundsInParent().getWidth() / 2));
gSink.setTranslateY(HEIGHT - gSink.getBoundsInParent().getHeight() - hbSinkHandles.getTranslateY());
this.getChildren().add(gSink);
}
示例14: drawStorage
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public void drawStorage() { // Shelf and boxes
// Draw shelf
Rectangle rgST = new Rectangle(WIDTH / 3, HEIGHT / 2);
rgST.setFill(Color.web("673232"));
gShelf.getChildren().add(rgST);
Rectangle rgSB = new Rectangle(rgST.getWidth() - (WIDTH / (WIDTH / 4)), rgST.getHeight() / 12);
rgSB.setX(rgST.getWidth() / 2 - rgSB.getWidth() / 2);
rgSB.setY(rgST.getHeight());
rgSB.setFill(Color.web("4d2626"));
gShelf.getChildren().add(rgSB);
Rectangle rgSI = new Rectangle(rgST.getWidth() - (WIDTH / (WIDTH / 4)), rgST.getHeight() - (HEIGHT / (HEIGHT / 4)));
rgSI.setX((WIDTH / (WIDTH / 2)));
rgSI.setY((HEIGHT / (HEIGHT / 2)));
rgSI.setFill(Color.web("7d3232"));
gShelf.getChildren().add(rgSI);
Rectangle rgSDT = new Rectangle(rgST.getWidth(), (HEIGHT / (HEIGHT / 2)));
rgSDT.setY(rgST.getY() + (rgST.getHeight() / 3));
rgSDT.setFill(Color.web("673232"));
gShelf.getChildren().add(rgSDT);
Rectangle rgSDB = new Rectangle(rgST.getWidth(), (HEIGHT / (HEIGHT / 2)));
rgSDB.setY(rgST.getY() + (rgST.getHeight() / 3) * 2);
rgSDB.setFill(Color.web("673232"));
gShelf.getChildren().add(rgSDB);
// Draw boxes
Rectangle rgB1 = new Rectangle(rgST.getWidth() / 3, rgST.getHeight() / 4);
rgB1.setX(WIDTH / (WIDTH / 2));
rgB1.setY(rgSDB.getY() - rgB1.getHeight());
rgB1.setFill(Color.web("d6b0a0"));
gShelf.getChildren().add(rgB1);
Rectangle rgB2 = new Rectangle(rgST.getWidth() / 3, rgST.getHeight() / 4);
rgB2.setX(WIDTH / (WIDTH / 2) + rgB2.getWidth());
rgB2.setY(rgSDT.getY() - rgB1.getHeight());
rgB2.setFill(Color.web("d6b0a0"));
gShelf.getChildren().add(rgB2);
Rectangle rgB3 = new Rectangle(rgST.getWidth() / 3, rgST.getHeight() / 4);
rgB3.setX(WIDTH / (WIDTH / 2) + rgB2.getWidth() + (rgB2.getWidth() / 2));
rgB3.setY(rgST.getY() + rgST.getHeight() - rgB1.getHeight() - (HEIGHT / (HEIGHT / 2)));
rgB3.setFill(Color.web("d6b0a0"));
gShelf.getChildren().add(rgB3);
// Position shelf
gShelf.setTranslateX(WIDTH - gShelf.getBoundsInParent().getWidth() * 2.25);
gShelf.setTranslateY(HEIGHT - gShelf.getBoundsInParent().getHeight());
this.getChildren().add(gShelf);
}
示例15: resizeBlindFoldPanel
import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
private static void resizeBlindFoldPanel(Rectangle blindFoldPanel, HBox menuHBox) {
blindFoldPanel.setX(0);
blindFoldPanel.setY(0);
blindFoldPanel.setWidth(menuHBox.getWidth());
blindFoldPanel.setHeight(menuHBox.getHeight());
}