当前位置: 首页>>代码示例>>Java>>正文


Java Rectangle.setHeight方法代码示例

本文整理汇总了Java中javafx.scene.shape.Rectangle.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Rectangle.setHeight方法的具体用法?Java Rectangle.setHeight怎么用?Java Rectangle.setHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.shape.Rectangle的用法示例。


在下文中一共展示了Rectangle.setHeight方法的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());
    }
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:18,代码来源:ImagePanel.java

示例2: 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);
}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:24,代码来源:AspectRatioImageRectangleUtil.java

示例3: EmergencyStopControl

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public EmergencyStopControl() {
	super("Emergency Stop", FlashboardSendableType.ESTOP);
	
	statusRect = new Rectangle();
	statusRect.setWidth(160);
	statusRect.setHeight(40);
	statusRect.setFill(Color.GREEN);
	statusRect.setStroke(Color.BLACK);
	
	button = new javafx.scene.control.Button("Emergency Stop");
	button.setPrefWidth(160);
	button.setPrefHeight(40);
	button.setOnAction((e)->{
		change();
	});
	
	root = new VBox();
	root.setAlignment(Pos.CENTER);
	root.setSpacing(2.0);
	root.getChildren().addAll(button, statusRect);
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:22,代码来源:EmergencyStopControl.java

示例4: 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()));

    }
}
 
开发者ID:kaanburaksener,项目名称:octoBubbles,代码行数:20,代码来源:CreateNodeController.java

示例5: createPieceRectangle

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
private Rectangle createPieceRectangle() {
    Rectangle rec = new Rectangle();
    rec.setX(-50);
    rec.setY(-50);
    rec.setWidth(SIZE);
    rec.setHeight(SIZE);
    return rec;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:PuzzlePieces.java

示例6: start

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
    stage.setTitle("Toggle Button Sample");
    stage.setWidth(250);
    stage.setHeight(180);
    
    HBox hbox = new HBox();
    VBox vbox = new VBox();        
    
    Scene scene = new Scene(new Group(vbox));
    stage.setScene(scene);
    scene.getStylesheets().add("togglebuttonsample/ControlStyle.css");

    Rectangle rect = new Rectangle();
    rect.setHeight(50);
    rect.setFill(Color.WHITE);
    rect.setStroke(Color.DARKGRAY);
    rect.setStrokeWidth(2);
    rect.setArcHeight(10);
    rect.setArcWidth(10);

    final ToggleGroup group = new ToggleGroup();

    group.selectedToggleProperty().addListener(
        (ObservableValue<? extends Toggle> ov, 
        Toggle toggle, Toggle new_toggle) -> {
        if (new_toggle == null)
            rect.setFill(Color.WHITE);
        else
            rect.setFill((Color) group.getSelectedToggle().getUserData());
    });

    ToggleButton tb1 = new ToggleButton("Minor");
    tb1.setToggleGroup(group);
    tb1.setUserData(Color.LIGHTGREEN);
    tb1.setSelected(true);
    tb1.getStyleClass().add("toggle-button1");

    ToggleButton tb2 = new ToggleButton("Major");
    tb2.setToggleGroup(group);
    tb2.setUserData(Color.LIGHTBLUE);
    tb2.getStyleClass().add("toggle-button2");

    ToggleButton tb3 = new ToggleButton("Critical");
    tb3.setToggleGroup(group);
    tb3.setUserData(Color.SALMON);
    tb3.getStyleClass().add("toggle-button3");

    

    hbox.getChildren().addAll(tb1, tb2, tb3);

    vbox.getChildren().add(new Label("Priority:"));
    vbox.getChildren().add(hbox);
    vbox.getChildren().add(rect);
    vbox.setPadding(new Insets(20, 10, 10, 20));

          
    stage.show();
    rect.setWidth(hbox.getWidth());
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:62,代码来源:ToggleButtonSample.java

示例7: getVisual

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@Override
public Node getVisual (Block block) {
    Rectangle rect = super.getRectangle(block);
    rect.setWidth(myWidth);
    rect.setHeight(myHeight);
    return rect;
}
 
开发者ID:tomrom95,项目名称:GameAuthoringEnvironment,代码行数:8,代码来源:ScaleFactory.java

示例8: finish

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
private void finish(Rectangle rectanlge){
    aDrawPane.getChildren().remove(rectanlge);
    try{
    	rectanlge.setWidth(0);
    	rectanlge.setHeight(0);        	
    }catch (Exception e){
    	e.printStackTrace();
    }
}
 
开发者ID:kaanburaksener,项目名称:octoBubbles,代码行数:10,代码来源:CreateNodeController.java

示例9: Clavier

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public Clavier(Instru instru) {

        this.instru = instru;// l'objet de type Instru prend la valeur de l'objet passé en paramètre

        Rectangle fond_clavier = new Rectangle();
        fond_clavier.setWidth(400);
        fond_clavier.setHeight(200);
        fond_clavier.setArcWidth(30);
        fond_clavier.setArcHeight(30);
        fond_clavier.setFill( // on remplie notre rectangle avec un dégradé
                new LinearGradient(0f, 0f, 0f, 1f, true, CycleMethod.NO_CYCLE,
                        new Stop[] { new Stop(0, Color.web("#333333")), new Stop(1, Color.web("#000000")) }));
        Reflection r = new Reflection();// on applique un effet de réflection
        r.setFraction(0.25);
        r.setBottomOpacity(0);
        r.setTopOpacity(0.5);
        fond_clavier.setEffect(r);

        touches = new Touche[] { new Touche("U", 50, 20, 60, instru), new Touche("I", 128, 20, 62, instru),
                new Touche("O", 206, 20, 64, instru), new Touche("P", 284, 20, 65, instru),
                new Touche("J", 75, 98, 67, instru), new Touche("K", 153, 98, 69, instru),
                new Touche("L", 231, 98, 71, instru), new Touche("M", 309, 98, 72, instru) };

        this.setTranslateX(50);
        this.setTranslateY(250);
        this.getChildren().add(fond_clavier);

        for (Touche touche : touches) { // on insère chaque touche une par une.
            this.getChildren().add(touche);
        }

    }
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:33,代码来源:Clavier.java

示例10: ColorPickerTool

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public ColorPickerTool(Color startColor) {
    setMinWidth(USE_PREF_SIZE);
    setMaxWidth(Double.MAX_VALUE);
    setAlignment(Pos.BASELINE_LEFT);
    getStyleClass().add("color-picker");
    setTextFill(Color.WHITE);
    
    color.set(startColor);
    textProperty().bind(new StringBinding() {
        { bind(color); }
        @Override protected String computeValue() {
            return getWebColor(getColor());
        }
    });
    setOnAction((ActionEvent arg0) -> {
        if (popover == null) {
            popover = new ColorPickerPopover();
            popover.colorProperty().addListener((ObservableValue<? extends Color> arg1, Color arg2, Color newValue) -> {
                setColor(newValue);
            });
        }
        if (popover.isShowing()) {
            popover.hide();
        } else {
            popover.setColor(getColor());
            popover.show(ColorPickerTool.this);
        }
    });
    Rectangle colorRect = new Rectangle();
    colorRect.setWidth(16);
    colorRect.setHeight(16);
    colorRect.fillProperty().bind(new ObjectBinding<Paint>() { { bind(color); }
        @Override protected Paint computeValue() {
            return getColor();
        }
    });
    colorRect.setEffect(new DropShadow(3, 0, 1, Color.rgb(0, 0, 0, 0.8)));
    setGraphic(colorRect);
}
 
开发者ID:EricCanull,项目名称:fxexperience2,代码行数:40,代码来源:ColorPickerTool.java

示例11: Group

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
public Group(){
    body = new Pane();

    background = new Rectangle();
    background.setWidth(1000);
    background.setHeight(1000);
    body.getChildren().add(background);
}
 
开发者ID:whitewoodcity,项目名称:xbrowser,代码行数:9,代码来源:Group.java

示例12: setAnimation

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private void setAnimation(){
	  // Initially hiding the Top Pane
	  clipRect = new Rectangle();
	  clipRect.setWidth(boxBounds.getWidth());
	  clipRect.setHeight(0);
	  clipRect.translateYProperty().set(boxBounds.getWidth());
	  laytable.setClip(clipRect);
	  laytable.translateYProperty().set(-boxBounds.getWidth());
	 
	  // Animation for bouncing effect.
	  final Timeline timelineBounce = new Timeline();
	  timelineBounce.setCycleCount(2);
	  timelineBounce.setAutoReverse(true);
	  final KeyValue kv1 = new KeyValue(clipRect.heightProperty(), (boxBounds.getHeight()-15));
	  final KeyValue kv2 = new KeyValue(clipRect.translateYProperty(), 15);
	  final KeyValue kv3 = new KeyValue(laytable.translateYProperty(), -15);
	  final KeyFrame kf1 = new KeyFrame(Duration.millis(100), kv1, kv2, kv3);
	  timelineBounce.getKeyFrames().add(kf1);
	  
	  // Event handler to call bouncing effect after the scroll down is finished.
	  EventHandler onFinished = new EventHandler() {
				@Override
				public void handle(Event event) {
					timelineBounce.play();
				}
	        };
	        
	        timelineDown = new Timeline();
	        timelineUp = new Timeline();
	        
	        // Animation for scroll down.
	  timelineDown.setCycleCount(1);
	  timelineDown.setAutoReverse(true);
	  final KeyValue kvDwn1 = new KeyValue(clipRect.heightProperty(), boxBounds.getWidth());
	  final KeyValue kvDwn2 = new KeyValue(clipRect.translateYProperty(), 0);
	  final KeyValue kvDwn3 = new KeyValue(laytable.translateYProperty(), 0);
	  final KeyFrame kfDwn = new KeyFrame(Duration.millis(1000), onFinished, kvDwn1, kvDwn2, kvDwn3);
	  timelineDown.getKeyFrames().add(kfDwn);
	  
	  // Animation for scroll up.
	  timelineUp.setCycleCount(1); 
	  timelineUp.setAutoReverse(true);
	  final KeyValue kvUp1 = new KeyValue(clipRect.heightProperty(), 0);
	  final KeyValue kvUp2 = new KeyValue(clipRect.translateYProperty(), boxBounds.getHeight());
	  final KeyValue kvUp3 = new KeyValue(laytable.translateYProperty(), -boxBounds.getHeight());
	  final KeyFrame kfUp = new KeyFrame(Duration.millis(1000), kvUp1, kvUp2, kvUp3);
	  timelineUp.getKeyFrames().add(kfUp);
	  
	 }
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:51,代码来源:Office_Entry.java

示例13: setAnimation

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private void setAnimation(){
  // Initially hiding the Top Pane
  clipRect = new Rectangle();
        clipRect.setWidth(boxBounds.getWidth());
  clipRect.setHeight(0);
  clipRect.translateYProperty().set(boxBounds.getWidth());
  layall.setClip(clipRect);
  layall.translateYProperty().set(-boxBounds.getWidth());
  
  layoffice.translateYProperty().set(-boxBounds.getWidth());
  
  // Animation for bouncing effect.
  final Timeline timelineBounce = new Timeline();
  timelineBounce.setCycleCount(2);
  timelineBounce.setAutoReverse(true);
  final KeyValue kv1 = new KeyValue(clipRect.heightProperty(), (boxBounds.getHeight()-15));
  final KeyValue kv2 = new KeyValue(clipRect.translateYProperty(), 15);
  final KeyValue kv3 = new KeyValue(layall.translateYProperty(), -15);
  final KeyFrame kf1 = new KeyFrame(Duration.millis(100), kv1, kv2, kv3);
  timelineBounce.getKeyFrames().add(kf1);
  
  // Event handler to call bouncing effect after the scroll down is finished.
  EventHandler onFinished = new EventHandler() {
			@Override
			public void handle(Event event) {
				timelineBounce.play();
			}
        };

        
        timelineDown = new Timeline();
        timelineUp = new Timeline();
        timelineoffice= new Timeline();
       
        // Animation for scroll down.
  timelineDown.setCycleCount(1);
  timelineDown.setAutoReverse(true);
  final KeyValue kvDwn1 = new KeyValue(clipRect.heightProperty(), boxBounds.getWidth());
  final KeyValue kvDwn2 = new KeyValue(clipRect.translateYProperty(), 0);
  final KeyValue kvDwn3 = new KeyValue(layall.translateYProperty(), 0);
  final KeyValue kvDwn4 = new KeyValue(layoffice.translateYProperty(), -boxBounds.getHeight()-190);
  final KeyFrame kfDwn = new KeyFrame(Duration.millis(1000), onFinished, kvDwn1, kvDwn2, kvDwn3, kvDwn4);
  timelineDown.getKeyFrames().add(kfDwn);
  
  // Animation for scroll up.
  timelineUp.setCycleCount(1); 
  timelineUp.setAutoReverse(true);
  final KeyValue kvUp1 = new KeyValue(clipRect.heightProperty(), 0);
  final KeyValue kvUp2 = new KeyValue(clipRect.translateYProperty(), boxBounds.getHeight());
  final KeyValue kvUp3 = new KeyValue(layall.translateYProperty(), -boxBounds.getHeight()-190);
  final KeyValue kvUp4 = new KeyValue(layoffice.translateYProperty(), -boxBounds.getHeight()-190);
  final KeyFrame kfUp = new KeyFrame(Duration.millis(1000), kvUp1, kvUp2, kvUp3, kvUp4);
  timelineUp.getKeyFrames().add(kfUp);
  
  //Animation for the scrollside
  timelineoffice.setCycleCount(1);
  timelineoffice.setAutoReverse(true);
  final KeyValue kvside1 = new KeyValue(clipRect.heightProperty(), boxBounds.getWidth());
  final KeyValue kvside2 = new KeyValue(clipRect.translateYProperty(), 0);
  final KeyValue kvside3 = new KeyValue(layoffice.translateYProperty(), 0);
  final KeyValue kvside4 = new KeyValue(layall.translateYProperty(), -boxBounds.getHeight());
  final KeyFrame kfside = new KeyFrame(Duration.millis(1000), kvside1, kvside2, kvside3, kvside4);
  timelineoffice.getKeyFrames().add(kfside);
  
 }
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:67,代码来源:MainWindow.java

示例14: setAnimation

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private void setAnimation(){
	  // Initially hiding the Top Pane
	  clipRect = new Rectangle();
	        clipRect.setWidth(boxBounds.getWidth());
	  clipRect.setHeight(0);
	  clipRect.translateXProperty().set(boxBounds.getWidth());
	  topPane.setClip(clipRect);
	  topPane.translateXProperty().set(-boxBounds.getWidth());
	  
	  thirdpane.translateXProperty().set(-boxBounds.getWidth());
	  
	  fourthpane.translateXProperty().set(-boxBounds.getWidth());
	  
	  // Animation for bouncing effect.
	  final Timeline timelineBounce = new Timeline();
	  timelineBounce.setCycleCount(2);
	  timelineBounce.setAutoReverse(true);
	  final KeyValue kv1 = new KeyValue(clipRect.heightProperty(), (boxBounds.getHeight()-15));
	  final KeyValue kv2 = new KeyValue(clipRect.translateYProperty(), 15);
	  final KeyValue kv3 = new KeyValue(topPane.translateYProperty(), -15);
	  final KeyFrame kf1 = new KeyFrame(Duration.millis(100), kv1, kv2, kv3);
	  timelineBounce.getKeyFrames().add(kf1);
	  
	  // Event handler to call bouncing effect after the scroll down is finished.
	  EventHandler onFinished = new EventHandler() {
				@Override
				public void handle(Event event) {
					timelineBounce.play();
				}
	        };
	        
	        timelineDown = new Timeline();
	        timelineUp = new Timeline();
	        timelinethree= new Timeline();
	        timelinefour= new Timeline();
	        // Animation for scroll down.
	  timelineDown.setCycleCount(1);
	  timelineDown.setAutoReverse(true);
	  final KeyValue kvDwn1 = new KeyValue(clipRect.heightProperty(), boxBounds.getWidth());
	  final KeyValue kvDwn2 = new KeyValue(clipRect.translateXProperty(), 0);
	  final KeyValue kvDwn3 = new KeyValue(topPane.translateXProperty(), 0);
	  final KeyValue kvDwn4 = new KeyValue(thirdpane.translateXProperty(), -boxBounds.getHeight());
	  final KeyValue kvDwn5 = new KeyValue(fourthpane.translateXProperty(), -boxBounds.getHeight());
	  final KeyFrame kfDwn = new KeyFrame(Duration.millis(1000), onFinished, kvDwn1, kvDwn2, kvDwn3, kvDwn4, kvDwn5);
	  timelineDown.getKeyFrames().add(kfDwn);
	  
	  // Animation for scroll up.
	  timelineUp.setCycleCount(1); 
	  timelineUp.setAutoReverse(true);
	  final KeyValue kvUp1 = new KeyValue(clipRect.heightProperty(), 0);
	  final KeyValue kvUp2 = new KeyValue(clipRect.translateXProperty(), boxBounds.getHeight());
	  final KeyValue kvUp3 = new KeyValue(topPane.translateXProperty(), -boxBounds.getHeight());
	  final KeyValue kvUp4 = new KeyValue(thirdpane.translateXProperty(), -boxBounds.getHeight());
	  final KeyValue kvUp5 = new KeyValue(fourthpane.translateXProperty(), -boxBounds.getHeight());
	  final KeyFrame kfUp = new KeyFrame(Duration.millis(1000), kvUp1, kvUp2, kvUp3, kvUp4, kvUp5);
	  timelineUp.getKeyFrames().add(kfUp);
	  
	  //Animation for the scrollside
	  timelinethree.setCycleCount(1);
	  timelinethree.setAutoReverse(true);
	  final KeyValue kvside1 = new KeyValue(clipRect.heightProperty(), boxBounds.getWidth());
	  final KeyValue kvside2 = new KeyValue(clipRect.translateXProperty(), 0);
	  final KeyValue kvside3 = new KeyValue(thirdpane.translateXProperty(), 0);
	  final KeyValue kvside4 = new KeyValue(fourthpane.translateXProperty(), -boxBounds.getHeight());
	  final KeyFrame kfside = new KeyFrame(Duration.millis(1000), kvside1, kvside2, kvside3, kvside4);
	  timelinethree.getKeyFrames().add(kfside);
	  
	  timelinefour.setCycleCount(1);
	  timelinefour.setAutoReverse(true);
	  final KeyValue kvfourth1 = new KeyValue(clipRect.heightProperty(), boxBounds.getWidth());
	  final KeyValue kvfourth2 = new KeyValue(clipRect.translateXProperty(), 0);
	  final KeyValue kvfourth3 = new KeyValue(fourthpane.translateXProperty(), 0);
	  final KeyFrame kffourth = new KeyFrame(Duration.millis(1000), kvfourth1, kvfourth2, kvfourth3);
	  timelinefour.getKeyFrames().add(kffourth);
	 }
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:77,代码来源:Help.java

示例15: testContentBoundChanged

import javafx.scene.shape.Rectangle; //导入方法依赖的package包/类
@Test
public void testContentBoundChanged() throws Exception {
	Rectangle rect = new Rectangle(128, 128, Color.RED);
	pane.setContent(rect);
	Thread.sleep(50);
	rect.setWidth(1000);
	rect.setHeight(1000);
	Thread.sleep(50);
	rect.setHeight(0);
	rect.setHeight(0);
}
 
开发者ID:tom91136,项目名称:GestureFX,代码行数:12,代码来源:GesturePaneTest.java


注:本文中的javafx.scene.shape.Rectangle.setHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。