當前位置: 首頁>>代碼示例>>Java>>正文


Java Color.TRANSPARENT屬性代碼示例

本文整理匯總了Java中javafx.scene.paint.Color.TRANSPARENT屬性的典型用法代碼示例。如果您正苦於以下問題:Java Color.TRANSPARENT屬性的具體用法?Java Color.TRANSPARENT怎麽用?Java Color.TRANSPARENT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在javafx.scene.paint.Color的用法示例。


在下文中一共展示了Color.TRANSPARENT屬性的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: handleMouseClick

private void handleMouseClick (Tile tile) {
    if (checkClickable(tile)) {
        if (tile.getTile().getFill() == Color.TRANSPARENT) {
            myLevel.getPlaceableTileManager().getPlaceableMap().getBitMap()[tile
                    .getRowPosition()][tile
                            .getColPosition()] = true;
            tile.getTile().setFill(Color.RED);
        }
        else if (tile.getTile().getFill() == Color.RED) {
            myLevel.getPlaceableTileManager().getPlaceableMap().getBitMap()[tile
                    .getRowPosition()][tile
                            .getColPosition()] = false;
            tile.getTile().setFill(Color.TRANSPARENT);
        }
    }
}
 
開發者ID:tomrom95,項目名稱:GameAuthoringEnvironment,代碼行數:16,代碼來源:GridRenderer.java

示例2: RadialGradientSample

public RadialGradientSample() {
    //create simple radial gradient
    RadialGradient gradient1 = new RadialGradient(0, 0, 0.5, 0.5, 1, true, CycleMethod.NO_CYCLE, new Stop[] {
        new Stop(0, Color.DODGERBLUE),
        new Stop(1, Color.BLACK)
    });
    Circle circle1 = new Circle(45, 45, 40, gradient1);

    //create complex radial gradient
    RadialGradient gradient2 = new RadialGradient(20, 1, 0.5, 0.5, 0.6, true, CycleMethod.NO_CYCLE, new Stop[] {
        new Stop(0,  Color.TRANSPARENT),
        new Stop(0.5,  Color.DARKGRAY),
        new Stop(0.64, Color.WHITESMOKE),
        new Stop(0.65, Color.YELLOW),
        new Stop(1, Color.GOLD)
    });
    Circle circle2 = new Circle(145, 45, 40, gradient2);

    HBox hb = new HBox(10);
    hb.getChildren().addAll(circle1, circle2);
    
    // show the circles
    getChildren().addAll(hb);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:24,代碼來源:RadialGradientSample.java

示例3: PlotItem

public PlotItem(final String NAME, final double VALUE, final String DESCRIPTION, final Color FILL) {
    _name        = NAME;
    _value       = VALUE;
    _description = DESCRIPTION;
    _fill        = FILL;
    _stroke      = Color.TRANSPARENT;
    _symbol      = Symbol.NONE;
    level        = -1;
    outgoing     = new LinkedHashMap<>();
    incoming     = new LinkedHashMap<>();
    listeners    = new CopyOnWriteArrayList<>();
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:12,代碼來源:PlotItem.java

示例4: createIconContent

public static Node createIconContent() {
    StackPane sp = new StackPane();
    BorderPane borderPane = new BorderPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    borderPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
 
    Rectangle recTop = new Rectangle(62, 5, Color.web("#349b00"));
    recTop.setStroke(Color.BLACK);
    Rectangle recBottom = new Rectangle(62, 14, Color.web("#349b00"));
    recBottom.setStroke(Color.BLACK);
    Rectangle recLeft = new Rectangle(20, 41, Color.TRANSPARENT);
    recLeft.setStroke(Color.BLACK);
    Rectangle recRight = new Rectangle(20, 41, Color.TRANSPARENT);
    recRight.setStroke(Color.BLACK);
    Rectangle centerRight = new Rectangle(20, 41, Color.TRANSPARENT);
    centerRight.setStroke(Color.BLACK);
    borderPane.setRight(recRight);
    borderPane.setTop(recTop);
    borderPane.setLeft(recLeft);
    borderPane.setBottom(recBottom);
    borderPane.setCenter(centerRight);
 
    sp.getChildren().addAll(rectangle, borderPane);
    return new Group(sp);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:27,代碼來源:BorderPaneSample.java

示例5: XYChartItem

public XYChartItem(final double X, final double Y, final String NAME, final Color FILL) {
    this(X, Y, NAME, FILL, Color.TRANSPARENT, Symbol.NONE);
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:3,代碼來源:XYChartItem.java

示例6: Series

public Series(final List<T> ITEMS, final ChartType TYPE, final String NAME) {
    this(ITEMS, TYPE, NAME, Color.TRANSPARENT, Color.BLACK, Color.BLACK, Color.BLACK, Symbol.CIRCLE);
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:3,代碼來源:Series.java

示例7: XYZChartItem

public XYZChartItem(final double X, final double Y, final double Z) {
    this(X, Y, Z, "", Color.RED, Color.TRANSPARENT, Symbol.NONE);
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:3,代碼來源:XYZChartItem.java

示例8: ChartData

public ChartData(final String NAME, final Color FILL_COLOR) {
    this(NAME, 0, FILL_COLOR, Color.TRANSPARENT, Color.BLACK, Instant.now(), true, 800);
}
 
開發者ID:HanSolo,項目名稱:SunburstChart,代碼行數:3,代碼來源:ChartData.java

示例9: ChartItem

public ChartItem(final double VALUE, final Instant TIMESTAMP) {
    this("", VALUE, Color.rgb(233, 30, 99), Color.TRANSPARENT, Color.BLACK, TIMESTAMP, false, 800);
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:3,代碼來源:ChartItem.java

示例10: YSeries

public YSeries(final List<T> ITEMS, final ChartType TYPE, final String NAME) {
    this(ITEMS, TYPE, NAME, Color.TRANSPARENT, Color.BLACK, Symbol.CIRCLE);
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:3,代碼來源:YSeries.java

示例11: YChartItem

public YChartItem(final double Y, final String NAME) {
    this(Y, NAME, Color.RED, Color.TRANSPARENT, Symbol.NONE);
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:3,代碼來源:YChartItem.java

示例12: PixelMatrix

public PixelMatrix(final int COLS, final int ROWS, final Color DOT_ON_COLOR) {
    this(250, 250, COLS, ROWS, DOT_ON_COLOR, Color.TRANSPARENT, PixelShape.SQUARE);
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:3,代碼來源:PixelMatrix.java


注:本文中的javafx.scene.paint.Color.TRANSPARENT屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。