Codota Logo
Arc.setLength
Code IndexAdd Codota to your IDE (free)

How to use
setLength
method
in
javafx.scene.shape.Arc

Best Java code snippets using javafx.scene.shape.Arc.setLength (Showing top 6 results out of 315)

  • Common ways to obtain Arc
private void myMethod () {
Arc a =
  • Codota Iconnew Arc()
  • Smart code suggestions by Codota
}
origin: jfoenixadmin/JFoenix

/**
 * {@inheritDoc}
 */
@Override
protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight) {
  final double strokeWidth = arc.getStrokeWidth();
  final double radius = Math.min(contentWidth, contentHeight) / 2 - strokeWidth / 2;
  final double arcSize = snapSize(radius * 2 + strokeWidth);
  arcPane.resizeRelocate((contentWidth - arcSize) / 2 + 1, (contentHeight - arcSize) / 2 + 1, arcSize, arcSize);
  updateArcLayout(radius, arcSize);
  fillRect.setWidth(arcSize);
  fillRect.setHeight(arcSize);
  if (!isValid) {
    initialize();
    isValid = true;
  }
  if (!getSkinnable().isIndeterminate()) {
    arc.setLength(arcLength);
    if (text.isVisible()) {
      final double progress = control.getProgress();
      int intProgress = (int) Math.round(progress * 100.0);
      Font font = text.getFont();
      text.setFont(Font.font(font.getFamily(), radius / 1.7));
      text.setText((progress > 1 ? 100 : intProgress) + "%");
      text.relocate((arcSize - text.getLayoutBounds().getWidth()) / 2, (arcSize - text.getLayoutBounds().getHeight()) / 2);
    }
  }
}
origin: jfoenixadmin/JFoenix

arc.setManaged(false);
arc.setStartAngle(0);
arc.setLength(180);
arc.getStyleClass().setAll("arc");
arc.setFill(Color.TRANSPARENT);
track.setManaged(false);
track.setStartAngle(0);
track.setLength(360);
track.setStrokeWidth(3);
track.getStyleClass().setAll("track");
origin: com.powsybl/powsybl-gse-network-explorer

private static Arc createArc(Color stroke, double strokeWidth) {
  Arc a = new Arc();
  a.setStartAngle(135);
  a.setLength(-270);
  a.setFill(Color.TRANSPARENT);
  a.setStroke(stroke);
  a.setStrokeWidth(strokeWidth);
  return a;
}
origin: com.powsybl/powsybl-gse-network-explorer

public GeneratorSymbol(Color stroke, double strokeWidth, double size) {
  setPrefSize(size, size);
  c = new Circle();
  c.setFill(Color.TRANSPARENT);
  c.setStroke(stroke);
  c.setStrokeWidth(strokeWidth);
  a1 = new Arc();
  a1.setStartAngle(0);
  a1.setLength(180);
  a1.setFill(Color.TRANSPARENT);
  a1.setStroke(stroke);
  a1.setStrokeWidth(strokeWidth);
  a2 = new Arc();
  a2.setStartAngle(0);
  a2.setLength(-180);
  a2.setFill(Color.TRANSPARENT);
  a2.setStroke(stroke);
  a2.setStrokeWidth(strokeWidth);
  getChildren().addAll(c, a1, a2);
}
origin: com.jfoenix/jfoenix

/**
 * {@inheritDoc}
 */
@Override
protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight) {
  final double strokeWidth = arc.getStrokeWidth();
  final double radius = Math.min(contentWidth, contentHeight) / 2 - strokeWidth / 2;
  final double arcSize = snapSize(radius * 2 + strokeWidth);
  arcPane.resizeRelocate((contentWidth - arcSize) / 2 + 1, (contentHeight - arcSize) / 2 + 1, arcSize, arcSize);
  updateArcLayout(radius, arcSize);
  fillRect.setWidth(arcSize);
  fillRect.setHeight(arcSize);
  if (!isValid) {
    initialize();
    isValid = true;
  }
  if (!getSkinnable().isIndeterminate()) {
    arc.setLength(arcLength);
    if (text.isVisible()) {
      final double progress = control.getProgress();
      int intProgress = (int) Math.round(progress * 100.0);
      Font font = text.getFont();
      text.setFont(Font.font(font.getFamily(), radius / 1.7));
      text.setText((progress > 1 ? 100 : intProgress) + "%");
      text.relocate((arcSize - text.getLayoutBounds().getWidth()) / 2, (arcSize - text.getLayoutBounds().getHeight()) / 2);
    }
  }
}
origin: com.jfoenix/jfoenix

arc.setManaged(false);
arc.setStartAngle(0);
arc.setLength(180);
arc.getStyleClass().setAll("arc");
arc.setFill(Color.TRANSPARENT);
track.setManaged(false);
track.setStartAngle(0);
track.setLength(360);
track.setStrokeWidth(3);
track.getStyleClass().setAll("track");
javafx.scene.shapeArcsetLength

Popular methods of Arc

  • <init>
  • setCenterX
  • setCenterY
  • setFill
  • setRadiusX
  • setRadiusY
  • setStartAngle
  • setStroke
  • setStrokeWidth
  • getStroke
  • getStrokeWidth
  • getStyleClass
  • getStrokeWidth,
  • getStyleClass,
  • lengthProperty,
  • setManaged,
  • startAngleProperty,
  • strokeProperty,
  • getCenterX,
  • getCenterY,
  • getLength

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Notification (javax.management)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now