ij.gui.Line.setStrokeWidth()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中ij.gui.Line.setStrokeWidth()方法的一些代码示例,展示了Line.setStrokeWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Line.setStrokeWidth()方法的具体详情如下:
包路径:ij.gui.Line
类名称:Line
方法名:setStrokeWidth

Line.setStrokeWidth介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

Line line = new Line(0,0,100,0);
line.setStrokeWidth(10);
line.setStroke(new LinearGradient(0d, -5d, 0d, 5d, false,
        CycleMethod.NO_CYCLE, new Stop(0,Color.BLACK), 
                   new Stop(0.199,Color.BLACK),
                   new Stop(0.2,Color.RED),
                   new Stop(0.799,Color.RED),
                   new Stop(0.8,Color.BLACK)));

代码示例来源:origin: stackoverflow.com

Line stroke = new Line(0, 0, 100, 100);
Line fill = new Line(0, 0, 100, 100);
stroke.setStrokeWidth(10);
fill.setStrokeWidth(8);
stroke.setStroke(Color.BLACK);
fill.setStroke(Color.RED);
pane.addAll(stroke, fill);

代码示例来源:origin: stackoverflow.com

Line line3 = new Line(100, 10, 100, 100);
   line3.setStrokeWidth(5);
   line3.setStroke(Color.BLUE);
   getChildren().add(line3); // <---you can remove this
   Line line4 = new Line(10, 100, 100, 100);
   line3.setStrokeWidth(5);
   line3.setStroke(Color.DARKGREEN);
   getChildren().add(line3);

代码示例来源:origin: stackoverflow.com

@Override
public void start(Stage primaryStage) throws Exception {
  Group group = new Group();
  primaryStage.setScene(new Scene(group, 200, 350));

  Line line = new Line(100, 50, 100, 300);
  LinearGradient linearGradient = new LinearGradient(0d, 0d, 0d, 1d, true,
   CycleMethod.NO_CYCLE, new Stop(0,Color.RED),new Stop(1,Color.GREEN));
line.setStrokeWidth(36); // 3em
  line.setStroke(linearGradient);
  group.getChildren().add(line);
  primaryStage.show();
}

代码示例来源:origin: stackoverflow.com

line.setStrokeWidth(3);
line.setStroke(Color.BLACK);

代码示例来源:origin: stackoverflow.com

@Override
public void start( final Stage primaryStage )
{
  Line l1 = new Line( 0.5, 0, 15.5, 0 );
  l1.setStrokeWidth( 2 );
  Line l2 = new Line( 0.5, 5, 15.5, 5 );
  l2.setStrokeWidth( 2 );
  Line l3 = new Line( 0.5, 10, 15.5, 10 );
  l3.setStrokeWidth( 2 );

  MenuButton m = new MenuButton();
  m.setGraphic( new Group( l1, l2, l3 ) );
  m.getItems().addAll( new MenuItem( "Settings" ), new MenuItem( "About" ) );

  Platform.runLater(() ->
  {
    // hide the arrow of menuButton
    m.lookup( ".arrow" ).setStyle( "-fx-background-insets: 0; -fx-padding: 0; -fx-shape: null;" );
    // hide the arraw-button pane, to remove unnecessary padding
    m.lookup( ".arrow-button" ).setStyle( "-fx-padding: 0" );
  });

  final Scene scene = new Scene( new Group( m ), 400, 300 );
  primaryStage.setScene( scene );
  primaryStage.show();
}

代码示例来源:origin: sc.fiji/Descriptor_based_registration

protected void addCross( final ImagePlus imp, final int x, final int y )
{
  Overlay o = imp.getOverlay();
  
  if ( o == null )
  {
    o = new Overlay();
    imp.setOverlay( o );
  }
  
  final Line line1 = new Line( x - 3, y, x + 3, y );
  final Line line2 = new Line( x, y - 3, x, y + 3 );
  
  line1.setStrokeColor( select );
  line2.setStrokeColor( select );
  
  line1.setStrokeWidth( selectWidth );
  line2.setStrokeWidth( selectWidth );
  o.add( line1 );
  o.add( line2 );
  
  imp.updateAndDraw();
}

代码示例来源:origin: stackoverflow.com

topLeftBottomRightLine.setStrokeWidth(dist);
bottomLeftTopRightLine.setStrokeWidth(dist);

代码示例来源:origin: stackoverflow.com

Button btn = new Button();
VBox root = new VBox();

final Line l1 = new Line(0, 200, 400, 200);
final Line l2 = new Line(0, 300, 400, 300);

l1.setManaged(false);
l2.setManaged(false);

btn.setText("Say 'Hello World'");
btn.setOnAction((ActionEvent event) -> {
  System.out.println("Hello World!");
});

l1.setStroke(Color.YELLOW);
l1.setStrokeWidth(2);
l2.setStroke(Color.YELLOW);
l2.setStrokeWidth(2);
root.getChildren().addAll(btn, l1, l2, rect);

代码示例来源:origin: stackoverflow.com

// construct invisible fat lines for selection
selectionLines.getChildren().clear();
for (Node child : connection.getChildren()) {
  Line line = (Line) child;
  Line selLine = new Line(line.getStartX(), line.getStartY(), line.getEndX(), line.getEndY());
  selLine.setLayoutX(line.getLayoutX());
  selLine.setLayoutY(line.getLayoutY());
  selLine.setStrokeWidth(SELECTION_LINE_WIDTH);
  selLine.setStroke(INVISIBLE);
  selectionLines.getChildren().add(selLine);
}
connection.getChildren().add(selectionLines);

代码示例来源:origin: stackoverflow.com

Button btn = new Button();
Rectangle rect = new Rectangle(400, 10);
GridPane root = new GridPane();
root.getRowConstraints().add(new RowConstraints(200));

final Line l1 = new Line(0, 0, 400, 0);

btn.setText("Say 'Hello World'");
btn.setOnAction((ActionEvent event) -> {
  System.out.println("Hello World!");
});

l1.setStroke(Color.YELLOW);
l1.setStrokeWidth(2);
root.addColumn(0, btn, l1, rect);

代码示例来源:origin: stackoverflow.com

Line line = new Line(20, 100, 80, 20);
line.getStrokeDashArray().setAll(25d, 20d, 5d, 20d);
line.setStrokeWidth(2);

代码示例来源:origin: stackoverflow.com

Slider slider = new Slider(0,100,50);
slider.setLayoutY(5);

Line line = new line();
line.setStrokeWidth(2);
line.setStroke(Color.RED);
line.setOpacity(0.3);
line.setStartX(50);
line.setEndX(50);
line.setStartY(4);
line.setEndY(21);
line.setVisible(true);

Group group = new Group(slider, line);

代码示例来源:origin: stackoverflow.com

line.setStrokeWidth(3);
line.setStroke(Color.RED);

代码示例来源:origin: stackoverflow.com

fw.setStroke(Color.ALICEBLUE);
bw.setStroke(Color.ALICEBLUE);
fw.setStrokeWidth(5);
bw.setStrokeWidth(5);
pane.getChildren().addAll(fw, bw);
new Scene(pane);

代码示例来源:origin: stackoverflow.com

line.setStrokeWidth(3);
pane.getChildren().add(line);
line.setOnMouseClicked(e -> {

代码示例来源:origin: stackoverflow.com

line.setStartY(30.5);
line.setEndY(30.5);
line.setStrokeWidth(1.0);
line.setStrokeType(StrokeType.CENTERED);
line.setStroke(Color.BLACK);
line2.setStartY(100.5);
line2.setEndY(100.5);
line2.setStrokeWidth(1.0);
line2.setStrokeType(StrokeType.CENTERED);
line2.setStroke(Color.BLACK);

代码示例来源:origin: sc.fiji/Colocalisation_Analysis

lineROI.setStrokeWidth(1.0f);
overlay.add(lineROI);

代码示例来源:origin: stackoverflow.com

Line l1 = new Line();
 l1.setStartX(400);
 l1.setStartY(50);
 l1.setEndX(400);
 l1.setEndY(400);
 double sWidth1 = 1;
 double sWidth2 = 10;
 double ecart = sWidth2*0.5 + sWidth1;
 Line l2 = new Line();
 l2.setStartX(400+ecart);
 l2.setStartY(50);
 l2.setEndX(400+ecart);
 l2.setEndY(400);
 l2.setStroke(Color.WHITE);
 l2.setStrokeWidth(10);
 l2.setStrokeLineCap(StrokeLineCap.BUTT);

代码示例来源:origin: net.imagej/ij

Line line = new Line(x, j+y, thickness+x, j+y);
line.setStrokeColor(new Color(rLUT[iMap]&0xff, gLUT[iMap]&0xff, bLUT[iMap]&0xff));
line.setStrokeWidth(1.0001);
overlay.add(line, CALIBRATION_BAR);

相关文章