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


Java Color.WHITE属性代码示例

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


在下文中一共展示了Color.WHITE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Atbash JWK Manager");

    BorderPane root = new BorderPane();

    Scene scene = new Scene(root, 600, 350, Color.WHITE);
    primaryStage.setMinWidth(500);
    primaryStage.setMinHeight(300);

    new ApplicationMenu(primaryStage, root).initialize();
    new HomeView(primaryStage, root).initialize();
    new Footer(primaryStage, root).initialize();

    root.prefHeightProperty().bind(scene.heightProperty());
    root.prefWidthProperty().bind(scene.widthProperty());

    primaryStage.setScene(scene);
    primaryStage.show();
}
 
开发者ID:atbashEE,项目名称:atbash-octopus,代码行数:20,代码来源:JWKManagerUI.java

示例2: SunburstChart

public SunburstChart(final TreeNode TREE) {
    backgroundPaint        = Color.TRANSPARENT;
    borderPaint            = Color.TRANSPARENT;
    borderWidth            = 0d;
    segments               = new ArrayList<>(64);
    _visibleData           = VisibleData.NAME;
    _textOrientation       = TextOrientation.TANGENT;
    _backgroundColor       = Color.WHITE;
    _textColor             = Color.BLACK;
    _useColorFromParent    = false;
    _decimals              = 0;
    _interactive           = false;
    _autoTextColor         = true;
    _brightTextColor       = BRIGHT_TEXT_COLOR;
    _darkTextColor         = DARK_TEXT_COLOR;
    _useChartDataTextColor = false;
    formatString           = "%.0f";
    tree                   = TREE;
    levelMap               = new HashMap<>(8);
    sizeListener           = o -> resize();
    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:SunburstChart,代码行数:23,代码来源:SunburstChart.java

示例3: DataUpdateDialog

public DataUpdateDialog(TatMain app, Window owner, FinancialMarket fm, TatConfig config, boolean bUpdateMode) {
       super();
       this.bUpdateMode = bUpdateMode;
       this.fm = fm;
       this.config = config;
       setResizable(false);
       initStyle(StageStyle.DECORATED);
       initOwner(owner);
       application = app;
       if (bUpdateMode == true){
           setTitle("View & update market data");
       } else {
           setTitle("Select a market data");
       }
       initModality(Modality.APPLICATION_MODAL);
       Image appIcon = new Image("icon/UPDATE_MARKET_DATA.png");
       getIcons().add(appIcon);
       root = new Group();
       Scene scene = new Scene(root, 700, 620, Color.WHITE);
       ImagePattern pattern = new ImagePattern(new Image("icon/bk5.jpg"));
       scene.setFill(pattern);
       setScene(scene);
       marketDataTreeView = new MarketDataTreeViewNode(application, fm, config, this.bUpdateMode);
       initGui();
       //Add listener to exit when press Esc key
       addEventHandler(KeyEvent.KEY_PRESSED, (KeyEvent event) -> {
           if (KeyCode.ESCAPE == event.getCode()) {
               DataUpdateDialog.this.close();
           }
       });
       setX(owner.getX() + Math.abs(owner.getWidth() - scene.getWidth()) / 2.0);
setY(owner.getY() + Math.abs(owner.getHeight() - scene.getHeight()) / 2.0);
   }
 
开发者ID:ztan5,项目名称:TechnicalAnalysisTool,代码行数:33,代码来源:DataUpdateDialog.java

示例4: makeErrorGUI

/**
    * Make a Error Dialog
    * @return BorderPane
    */
   public void makeErrorGUI() {
       root = new Group();
       Scene scene = new Scene(root, 360, 185, Color.WHITE);
       ImagePattern pattern = new ImagePattern(new Image("icon/bk2.jpg"));
       scene.setFill(pattern);
       setTitle("Error");
       setScene(scene);
       Image appIcon = new Image("icon/ERROR.png");
       getIcons().add(appIcon);
       BorderPane bp = new BorderPane();

       textArea = new TextArea(message);
       textArea.setEditable(false);
       textArea.setWrapText(true);
       textArea.setMaxWidth(320);
       textArea.setMaxHeight(130);
       HBox hBox = new HBox();
       hBox.setSpacing(5);
       hBox.setPadding(new Insets(5,0,0,0));
       hBox.setAlignment(Pos.BOTTOM_RIGHT);
       hBox.getChildren().addAll(openLogButton,okButton);
       bp.setCenter(textArea);
       bp.setBottom(hBox);
       root.getChildren().add(bp);
       sizeToScene();
       setX(owner.getX() + Math.abs(owner.getWidth() - scene.getWidth()) / 2.0);
setY(owner.getY() + Math.abs(owner.getHeight() - scene.getHeight()) / 2.0);
   }
 
开发者ID:ztan5,项目名称:TechnicalAnalysisTool,代码行数:32,代码来源:TatMessageBox.java

示例5: SunburstChart

public SunburstChart(final TreeNode<T> TREE) {
    backgroundPaint        = Color.TRANSPARENT;
    borderPaint            = Color.TRANSPARENT;
    borderWidth            = 0d;
    segments               = new ArrayList<>(64);
    _visibleData           = VisibleData.NAME;
    _textOrientation       = TextOrientation.TANGENT;
    _backgroundColor       = Color.WHITE;
    _textColor             = Color.BLACK;
    _useColorFromParent    = false;
    _decimals              = 0;
    _interactive           = false;
    _autoTextColor         = true;
    _brightTextColor       = BRIGHT_TEXT_COLOR;
    _darkTextColor         = DARK_TEXT_COLOR;
    _useChartItemTextColor = false;
    formatString           = "%.0f";
    tree                   = TREE;
    levelMap               = new HashMap<>(8);
    sizeListener           = o -> resize();
    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:23,代码来源:SunburstChart.java

示例6: makeInfoGUI

/**
    * Make Information Dialog
    * @return BorderPane
    */
   public void makeInfoGUI() {
       root = new Group();
       Scene scene = new Scene(root, 360, 185, Color.WHITE);
       ImagePattern pattern = new ImagePattern(new Image("icon/bk2.jpg"));
       scene.setFill(pattern);
       setTitle("Information");
       setScene(scene);
       Image appIcon = new Image("icon/INFO.png");
       getIcons().add(appIcon);
       BorderPane bp = new BorderPane();

       textArea = new TextArea(message);
       textArea.setEditable(false);
       textArea.setWrapText(true);
       textArea.setMaxWidth(320);
       textArea.setMaxHeight(130);
       HBox hBox = new HBox();
       hBox.setSpacing(5);
       hBox.setPadding(new Insets(5,0,0,0));
       hBox.setAlignment(Pos.BOTTOM_RIGHT);
       hBox.getChildren().addAll(okButton);
       bp.setCenter(textArea);
       bp.setBottom(hBox);
       root.getChildren().add(bp);
       sizeToScene();
       setX(owner.getX() + Math.abs(owner.getWidth() - scene.getWidth()) / 2.0);
setY(owner.getY() + Math.abs(owner.getHeight() - scene.getHeight()) / 2.0);
   }
 
开发者ID:ztan5,项目名称:TechnicalAnalysisTool,代码行数:32,代码来源:TatMessageBox.java

示例7: DataImportDialog

public DataImportDialog(Window owner, FinancialMarket fm, TatConfig config) {
       super();
       this.fm = fm;
       this.config = config;
       setResizable(false);
       initStyle(StageStyle.DECORATED);
       initOwner(owner);
       setTitle("Financial Market Import");
       initModality(Modality.APPLICATION_MODAL);
       Image appIcon = new Image("icon/IMPORT_MARKET_DATA.png");
       getIcons().add(appIcon);
       root = new Group();
       Scene scene = new Scene(root, 500, 440, Color.WHITE);
       ImagePattern pattern = new ImagePattern(new Image("icon/bk5.jpg"));
       scene.setFill(pattern);
       setScene(scene);
       initGui();
       //Add listener to exit when press Esc key
       addEventHandler(KeyEvent.KEY_PRESSED, (KeyEvent event) -> {
           if (KeyCode.ESCAPE == event.getCode()) {
               DataImportDialog.this.close();
           }
           if (KeyCode.ENTER == event.getCode()) {
               doImport();
           }
       });
       
       setX(owner.getX() + Math.abs(owner.getWidth() - scene.getWidth()) / 2.0);
setY(owner.getY() + Math.abs(owner.getHeight() - scene.getHeight()) / 2.0);
   }
 
开发者ID:ztan5,项目名称:TechnicalAnalysisTool,代码行数:30,代码来源:DataImportDialog.java

示例8: createIndicatorCircle

private Circle createIndicatorCircle(int i) {
    Circle circle = new Circle(INDICATOR_RADIUS, Color.WHITE);
    circle.setStroke(Color.BLACK);

    circle.fillProperty().bind(
            new When(
                    currentStep.greaterThanOrEqualTo(i))
                    .then(Color.DODGERBLUE)
                    .otherwise(Color.WHITE));

    return circle;
}
 
开发者ID:scify,项目名称:jedai-ui,代码行数:12,代码来源:WizardController.java

示例9: testChangeTrueColor

@Test
@Disabled
public void testChangeTrueColor() {
  final Color color = Color.WHITE;
  widget.getSource().setData(true);
  widget.setTrueColor(color);
  WaitForAsyncUtils.waitForFxEvents();
  assertEquals(color, getBackground(), "Background was the wrong color");
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:9,代码来源:BooleanBoxWidgetTest.java

示例10: getImagePixel

public static Color getImagePixel(File file) {
    try {
        return getImagePixel(new FileInputStream(file));
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
    return Color.WHITE;
}
 
开发者ID:IzzelAliz,项目名称:LCL,代码行数:8,代码来源:GetMainColor.java

示例11: getMaxCount

public static Color getMaxCount(List<String> s) {
    List<String> list = s;
    Map<String, Integer> map = new HashMap<String, Integer>();
    for (String c : list) {
        Integer l = map.get(c);
        if (l == null)
            l = 1;
        else
            l++;
        map.put(c, l);
    }
    String max = null;
    long num = 0;
    for (Map.Entry<String, Integer> entry : map.entrySet()) {
        String key = entry.getKey();
        Integer temp = entry.getValue();
        if (max == null || temp > num) {
            max = key;
            num = temp;
        }
    }
    String str[] = max.split("\\-");
    if (str.length == 3) {
        return Color.rgb(Integer.parseInt(str[0]), Integer.parseInt(str[1]),
                Integer.parseInt(str[2]));
    }
    return Color.WHITE;
}
 
开发者ID:IzzelAliz,项目名称:LCL,代码行数:28,代码来源:GetMainColor.java

示例12: CoxcombChart

public CoxcombChart(final List<ChartItem> ITEMS) {
    width               = PREFERRED_WIDTH;
    height              = PREFERRED_HEIGHT;
    size                = PREFERRED_WIDTH;
    items               = FXCollections.observableArrayList(ITEMS);
    _textColor          = Color.WHITE;
    _autoTextColor      = true;
    _order              = Order.DESCENDING;
    _equalSegmentAngles = false;
    itemListener        = e -> reorder(getOrder());
    itemListListener    = c -> {
        while (c.next()) {
            if (c.wasAdded()) {
                c.getAddedSubList().forEach(addedItem -> addedItem.setOnItemEvent(itemListener));
                reorder(getOrder());
            } else if (c.wasRemoved()) {
                c.getRemoved().forEach(removedItem -> removedItem.removeItemEventListener(itemListener));
                reorder(getOrder());
            }
        }
        redraw();
    };
    mouseHandler        = e -> handleMouseEvent(e);
    listeners           = new CopyOnWriteArrayList<>();
    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:27,代码来源:CoxcombChart.java

示例13: prepareTimeGrahLabelsContents

private Node prepareTimeGrahLabelsContents(Collection<StateRectangle> stateRectangles,
        TimeRange windowRange) {
    double minX = getWidget().timestampToPaneXPos(windowRange.getStartTime());

    final String ellipsisStr = DebugOptions.ELLIPSIS_STRING;
    final double ellipsisWidth = getWidget().getDebugOptions().getEllipsisWidth();
    final Font textFont = getWidget().getDebugOptions().stateLabelFont.get();
    final OverrunStyle overrunStyle = OverrunStyle.ELLIPSIS;
    final Color textColor = Color.WHITE;

    /* Requires a ~2 pixels adjustment to be centered on the states */
    final double yOffset = TimeGraphWidget.ENTRY_HEIGHT / 2.0 + 2.0;
    Collection<Node> texts = stateRectangles.stream()
            /* Only try to annotate rectangles that are large enough */
            .filter(stateRect -> stateRect.getWidth() > ellipsisWidth)
            .filter(stateRect -> stateRect.getStateInterval().getLabel() != null)
            .map(stateRect -> {
                String labelText = requireNonNull(stateRect.getStateInterval().getLabel());
                /* A small offset looks better here */
                double textX = Math.max(minX, stateRect.getX()) + 4.0;
                double textY = stateRect.getY() + yOffset;

                double rectEndX = stateRect.getX() + stateRect.getWidth();
                double minWidth = rectEndX - textX;

                String ellipsedText = JfxUtils.computeClippedText(textFont,
                        labelText,
                        minWidth,
                        overrunStyle,
                        ellipsisStr);

                if (ellipsedText.equals(ellipsisStr)) {
                    return null;
                }

                Text text = new Text(textX, textY, ellipsedText);
                text.setFont(textFont);
                text.setFill(textColor);
                return text;
            })
            .filter(Objects::nonNull)
            .collect(Collectors.toList());

    return new Group(texts);
}
 
开发者ID:lttng,项目名称:lttng-scope,代码行数:45,代码来源:TimeGraphStateLayer.java

示例14: SanFranciscoFireworks

public SanFranciscoFireworks() {
    // create a color palette of 180 colors
    colors = new Paint[181];
    colors[0] = new RadialGradient(0, 0, 0.5, 0.5, 0.5, true, CycleMethod.NO_CYCLE, 
                new Stop(0, Color.WHITE),
                new Stop(0.2, Color.hsb(59, 0.38, 1)),
                new Stop(0.6, Color.hsb(59, 0.38, 1,0.1)),
                new Stop(1, Color.hsb(59, 0.38, 1,0))
                );
    for (int h=0;h<360;h+=2) {
        colors[1+(h/2)] = new RadialGradient(0, 0, 0.5, 0.5, 0.5, true, CycleMethod.NO_CYCLE, 
                new Stop(0, Color.WHITE),
                new Stop(0.2, Color.hsb(h, 1, 1)),
                new Stop(0.6, Color.hsb(h, 1, 1,0.1)),
                new Stop(1, Color.hsb(h, 1, 1,0))
                );
    }
    // create canvas
    canvas = new Canvas(1024, 500);

    canvas.setBlendMode(BlendMode.ADD);
    canvas.setEffect(new Reflection(0,0.4,0.15,0));
    background = new ImageView(getClass().getResource("sf.jpg").toExternalForm());
    getChildren().addAll(background,canvas);
    // create animation timer that will be called every frame
    // final AnimationTimer timer = new AnimationTimer() {
    timer = new AnimationTimer() {

        @Override public void handle(long now) {
            GraphicsContext gc = canvas.getGraphicsContext2D();
            // clear area with transparent black
            gc.setFill(Color.rgb(0, 0, 0, 0.2));
            gc.fillRect(0, 0, 1024, 708);
            // draw fireworks
            drawFireworks(gc);
            // countdown to launching the next firework
            if (countDownTillNextFirework == 0) {
                countDownTillNextFirework = 10 + (int)(Math.random()*30);
                fireParticle();
            }
            countDownTillNextFirework --;
        }
    };
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:44,代码来源:FireworksSample.java

示例15: LegendItem

public LegendItem(final Symbol SYMBOL, final String TEXT, final Color SYMBOL_FILL) {
    this(SYMBOL, TEXT, SYMBOL_FILL, Color.WHITE, Color.BLACK);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:LegendItem.java


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