Java Code Examples for javafx.scene.paint.Color#BROWN

The following examples show how to use javafx.scene.paint.Color#BROWN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FoodView.java    From narjillos with MIT License 5 votes vote down vote up
public FoodView(FoodPellet food) {
	super(food);

	roundObjectView = new RoundObjectView(Configuration.FOOD_RADIUS) {

		@Override
		public Node toNode(double zoomLevel, boolean infraredOn, boolean effectsOn) {
			if (zoomLevel < MINIMUM_ZOOM_LEVEL)
				return null;

			getShape().setFill(getColor(infraredOn));

			if (infraredOn) {
				getShape().setStroke(Color.WHITE);
				getShape().setStrokeWidth(3);
			} else {
				getShape().setStrokeWidth(0);
			}

			if (effectsOn)
				getShape().setEffect(getEffects(zoomLevel, infraredOn));

			return getShape();
		}

		private Color getColor(boolean infraredOn) {
			if (infraredOn)
				return Color.RED;
			return Color.BROWN;
		}
	};
	roundObjectView.moveTo(food.getPosition());
}
 
Example 2
Source File: AsteroidsApp.java    From FXTutorials with MIT License 4 votes vote down vote up
Bullet() {
    super(new Circle(5, 5, 5, Color.BROWN));
}