Tabnine Logo
Circle.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
javafx.scene.shape.Circle
constructor

Best Java code snippets using javafx.scene.shape.Circle.<init> (Showing top 20 results out of 315)

origin: jfoenixadmin/JFoenix

@Override
protected Node getMask() {
  double radius = ripplerPane.getWidth() / 2;
  return new Circle(radius, radius, radius);
}
origin: jfoenixadmin/JFoenix

Circle outterCircle = new Circle(centerX, centerY, huesLargeR - 2);
Circle innterCircle = new Circle(centerX, centerY, huesSmallR + 2);
huesCircleView.setClip(Path.subtract(outterCircle, innterCircle));
this.getChildren().add(huesCircleView);
Circle r1 = new Circle(pickerRadius - huesSmallR);
Circle r2 = new Circle(pickerRadius - huesRadius);
colorSelector = new Pane();
colorSelector.setStyle(
slCircleView.setClip(new Circle(centerX, centerY, slRadius - 2));
slCircleView.setPickOnBounds(false);
this.getChildren().add(slCircleView);
Circle c1 = new Circle(selectorSize / 2);
Circle c2 = new Circle((selectorSize / 2) * 0.5);
selector.setShape(Path.subtract(c1, c2));
selector.setStyle(
origin: jfoenixadmin/JFoenix

private StackPane createMinutesContent(LocalTime time) {
  Circle selectionCircle = new Circle(contentCircleRadius / 6);
  selectionCircle.fillProperty().bind(timePicker.defaultColorProperty());
  Circle minCircle = new Circle(selectionCircle.getRadius() / 8);
  minCircle.setFill(Color.rgb(255, 255, 255, 0.87));
  minCircle.setTranslateX(selectionCircle.getRadius() - minCircle.getRadius());
origin: jfoenixadmin/JFoenix

private void init(final DoubleProperty rotationAngle, final double initControlX1, final double initControlY1) {
  final Circle innerCircle = new Circle(centerX, centerY, radius, Color.TRANSPARENT);
  final Circle outerCircle = new Circle(centerX, centerY, radius * 2, Color.web("blue", 0.5));
origin: jfoenixadmin/JFoenix

private StackPane createHoursContent(LocalTime time, boolean _24HourView) {
  Circle selectionCircle = new Circle(contentCircleRadius / 6),
    _24HourSelectionCircle = new Circle(contentCircleRadius / 6);
  selectionCircle.fillProperty().bind(timePicker.defaultColorProperty());
  _24HourSelectionCircle.fillProperty().bind(timePicker.defaultColorProperty());
origin: jfoenixadmin/JFoenix

protected BorderPane createContentPane(LocalTime time, boolean _24HourView) {
  Circle circle = new Circle(contentCircleRadius),
    selectionCircle = new Circle(contentCircleRadius / 6);
  circle.setFill(Color.rgb(224, 224, 224, 0.67));
origin: jfoenixadmin/JFoenix

case CIRCLE:
  double radius = Math.min((width / 2) - 2 * borderWidth, (height / 2) - 2 * borderWidth);
  mask = new Circle((bounds.getMinX() + diffMinX + bounds.getMaxX() - diffMaxX) / 2 - snappedLeftInset(),
    (bounds.getMinY() + diffMinY + bounds.getMaxY() - diffMaxY) / 2 - snappedTopInset(),
    radius,
origin: jfoenixadmin/JFoenix

private void updateColor() {
  final ColorPicker colorPicker = (ColorPicker) getSkinnable();
  Color color = colorPicker.getValue();
  // update picker box color
  Color circleColor = color == null ? Color.WHITE : color;
  Circle colorCircle = new Circle();
  colorCircle.setFill(circleColor);
  colorCircle.setLayoutX(colorBox.getWidth() / 4);
  colorCircle.setLayoutY(colorBox.getHeight() / 2);
  colorBox.getChildren().add(colorCircle);
  Timeline animateColor = new Timeline(new KeyFrame(Duration.millis(240),
    new KeyValue(colorCircle.radiusProperty(),
      200,
      Interpolator.EASE_BOTH)));
  animateColor.setOnFinished((finish) -> {
    JFXNodeUtils.updateBackground(colorBox.getBackground(), colorBox, colorCircle.getFill());
    colorBox.getChildren().remove(colorCircle);
  });
  animateColor.play();
  // update label color
  displayNode.setTextFill(circleColor.grayscale().getRed() < 0.5 ? Color.valueOf(
    "rgba(255, 255, 255, 0.87)") : Color.valueOf("rgba(0, 0, 0, 0.87)"));
  if (colorLabelVisible.get()) {
    displayNode.setText(JFXNodeUtils.colorToHex(circleColor));
  } else {
    displayNode.setText("");
  }
}
origin: jfoenixadmin/JFoenix

radio = new Circle(radioRadius);
radio.getStyleClass().setAll("radio");
radio.setStrokeWidth(2);
radio.setSmooth(true);
dot = new Circle(radioRadius);
dot.getStyleClass().setAll("dot");
dot.fillProperty().bind(control.selectedColorProperty());
origin: jfoenixadmin/JFoenix

line.setSmooth(true);
circle = new Circle();
circle.setFill(getSkinnable().isSelected() ? toggleButton.getToggleColor() : toggleButton.getUnToggleColor());
circle.setCenterX(-circleRadius);
origin: com.jfoenix/jfoenix

@Override
protected Node getMask() {
  double radius = ripplerPane.getWidth() / 2;
  return new Circle(radius, radius, radius);
}
origin: Tristan971/Lyrebird

/**
 * Builds a clip-ready {@link Circle} with a specific radius and specific center position.
 *
 * @param radius  The radius of this circle.
 * @param centerX The horizontal position for this circle's center
 * @param centerY The vertical position for this circle's center
 *
 * @return A circle with the given radius and center position
 */
private static Circle getCircleClip(final double radius, final double centerX, final double centerY) {
  final Circle clip = new Circle(radius);
  clip.setCenterX(centerX);
  clip.setCenterY(centerY);
  return clip;
}
origin: ch.sahits.game/OpenPatricianDisplay

private void drawShipPresenceInCity(ICity city, double offset) {
  int radius = 8;
  int cityX = (int) Math.rint(city.getCoordinates().getX());
  int cityY = (int) Math.rint(city.getCoordinates().getY());
  Circle c = new Circle((cityX - offset) * scale, cityY * scale, radius * scale, Color.WHITE);
  mapPane.getChildren().add(c);
}
origin: ch.sahits.game/OpenPatricianDisplay

private void drawShipPresenceInCity(ICity city) {
  int radius = 8;
  int cityX = (int) Math.rint(city.getCoordinates().getX());
  int cityY = (int) Math.rint(city.getCoordinates().getY());
  double lScale = scale.doubleValue();
  Circle c = new Circle(cityX * lScale, cityY * lScale, radius * lScale, Color.WHITE);
  shipCanvas.getChildren().add(c);
}
origin: com.powsybl/powsybl-gse-network-explorer

public TransformerSymbol(Color stroke, double strokeWidth, double size) {
  setPrefSize(size, size);
  c1 = new Circle();
  c1.setFill(Color.TRANSPARENT);
  c1.setStroke(stroke);
  c1.setStrokeWidth(strokeWidth);
  c2 = new Circle();
  c2.setFill(Color.TRANSPARENT);
  c2.setStroke(stroke);
  c2.setStrokeWidth(strokeWidth);
  getChildren().addAll(c1, c2);
}
origin: org.arakhne.afc.gis/giscoreui

/** Create the circle path.
 *
 * @param element the map element.
 * @param bounds the gis area bounds.
 * @return the JavaFX path.
 */
@Pure
protected Circle createCircle(T element, RectangularShape2afp<?, ?, ?, ?, ?, ?> bounds) {
  final Circle circle = new Circle(
      gis2screenx(element.getX(), bounds),
      gis2screeny(element.getY(), bounds),
      element.getRadius());
  return circle;
}
origin: com.github.almasb/fxgl-base

private void addDebugView(Entity e) {
  Text textPos = new Text("");
  textPos.textProperty().bind(e.xProperty().asString("(%.0f, ").concat(e.yProperty().asString("%.0f)")));
  EntityView view = new EntityView(new Circle(2.5));
  view.addNode(textPos);
  view.translateXProperty().bind(e.xProperty());
  view.translateYProperty().bind(e.yProperty());
  addGameView(view, RenderLayer.TOP);
  debugPositions.put(e, view);
}
origin: com.github.almasb/fxgl-base

private void addDebugViewSensor(HitBox hitBox) {
  Shape view = null;
  if (hitBox.getShape().isCircle()) {
    double radius = hitBox.getWidth() / 2;
    view = new Circle(radius, radius, radius, null);
  } else if (hitBox.getShape().isRectangle()) {
    view = new Rectangle(hitBox.getWidth(), hitBox.getHeight(), null);
  }
  if (view != null) {
    view.strokeProperty().bind(FXGL.getSettings().getDevSensorColor());
    view.setTranslateX(hitBox.getMinX());
    view.setTranslateY(hitBox.getMinY());
    debugBBox.getChildren().add(view);
  }
}
origin: com.github.almasb/fxgl-base

private void addDebugView(HitBox hitBox) {
  Shape view = null;
  if (hitBox.getShape().isCircle()) {
    double radius = hitBox.getWidth() / 2;
    view = new Circle(radius, radius, radius, null);
  } else if (hitBox.getShape().isRectangle()) {
    view = new Rectangle(hitBox.getWidth(), hitBox.getHeight(), null);
  }
  if (view != null) {
    view.strokeProperty().bind(FXGL.getSettings().getDevBBoxColor());
    view.setTranslateX(hitBox.getMinX());
    view.setTranslateY(hitBox.getMinY());
    debugBBox.getChildren().add(view);
  }
}
origin: eu.mihosoft.vrl.workflow/vworkflows-fx

protected void initSenderAndReceiver() {
  receiverConnectorUI = new Circle(15);
  final VNode sender = getSender().getNode();
  final FXFlowNodeSkin senderSkin = (FXFlowNodeSkin) getController().
      getNodeSkinLookup().getById(skinFactory, sender.getId());
  
  senderShape = senderSkin.getConnectorShape(getSender());
  final Node senderNode = senderShape.getNode();
  senderConnectorUI = senderShape;
  receiverConnectorUI.setLayoutX(senderNode.getLayoutX()
      +receiverConnectorUI.getRadius());
  receiverConnectorUI.setLayoutY(senderNode.getLayoutY()
      +receiverConnectorUI.getRadius());
}
javafx.scene.shapeCircle<init>

Popular methods of Circle

  • setFill
  • setCenterX
  • setCenterY
  • setRadius
  • fillProperty
  • getStyleClass
  • setStroke
  • setStrokeWidth
  • setTranslateX
  • getCenterX
  • getCenterY
  • getRadius
  • getCenterY,
  • getRadius,
  • radiusProperty,
  • setLayoutX,
  • setLayoutY,
  • setOnMouseDragged,
  • strokeProperty,
  • getFill,
  • minWidth

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Table (org.hibernate.mapping)
    A relational table
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now