Search in sources :

Example 6 with Rectangle

use of javafx.scene.shape.Rectangle in project Gargoyle by callakrsos.

the class DockTabPaneSkin method addTabContent.

private void addTabContent(DockTab tab) {
    TabContentRegion tabContentRegion = new TabContentRegion(tab);
    tabContentRegion.setClip(new Rectangle());
    tabContentRegions.add(tabContentRegion);
    // We want the tab content to always sit below the tab headers
    getChildren().add(0, tabContentRegion);
}
Also used : Rectangle(javafx.scene.shape.Rectangle)

Example 7 with Rectangle

use of javafx.scene.shape.Rectangle in project Gargoyle by callakrsos.

the class PMDViolationChartComposite method createNode.

/* (non-Javadoc)
	 * @see com.kyj.fx.voeditor.visual.component.pmd.chart.PMDViolationChartVisualable#createNode()
	 */
@Override
public Node createNode() {
    int ordinal = this.selectedViewType.get().ordinal();
    if (ordinal == -1)
        return new Rectangle();
    viewComposite.set(avalilableCompositeList.get(ordinal));
    return viewComposite.get();
//		switch (this.selectedViewType.get()) {
//
//		case GROUP_BY_FILE_LINE:
//
//			viewComposite.set(new PMDViolationFilebyLineChartComposite(master));
//			break;
//
//		case GROUP_BY_FILE_PIE:
//			viewComposite.set(new PMDViolationbyPieChartComposite(master));
//			break;
//
//		case GROUP_BY_VIOLATION:
//			viewComposite.set(new PMDViolationbyBarChartComposite(master));
//			break;
//		}
//		return viewComposite.get();
}
Also used : Rectangle(javafx.scene.shape.Rectangle)

Example 8 with Rectangle

use of javafx.scene.shape.Rectangle in project arquivoProject by fader-azevedo.

the class ListaPastaController method initialize.

@Override
public void initialize(URL url, ResourceBundle rb) {
    System.out.println("Pasta");
    double widthInitial = 10;
    double heightInitial = 10;
    clipRectNextDocument = new Rectangle();
    clipRectNextDocument.setWidth(0);
    clipRectNextDocument.setHeight(heightInitial);
    clipRectNextDocument.translateXProperty().set(widthInitial);
    pnCarregaDocumentos.setClip(clipRectNextDocument);
    pnCarregaDocumentos.translateXProperty().set(widthInitial * 100);
    pnCarregaDocumentos.prefWidthProperty().set(0);
    boxCaminho.setVisible(false);
    btnBack.setVisible(false);
    btnClosePasta.setOnAction(e -> {
        db.backtoMenu(panePrincipal);
    });
}
Also used : Rectangle(javafx.scene.shape.Rectangle)

Example 9 with Rectangle

use of javafx.scene.shape.Rectangle in project FXGL by AlmasB.

the class FXShooterApp method spawnEnemy.

private void spawnEnemy() {
    Entity enemy = new Entity();
    enemy.getTypeComponent().setValue(EntityType.ENEMY);
    enemy.getPositionComponent().setValue(getWidth(), 460);
    enemy.getViewComponent().setView(new EntityView(new Rectangle(40, 40, Color.RED)), true);
    enemy.addComponent(new CollidableComponent(true));
    enemy.addComponent(new HPComponent(5));
    enemy.addControl(new EnemyControl(new Point2D(getWidth() / 2, getHeight() / 2)));
    getGameWorld().addEntity(enemy);
}
Also used : Entity(com.almasb.fxgl.entity.Entity) EntityView(com.almasb.fxgl.entity.view.EntityView) Point2D(javafx.geometry.Point2D) CollidableComponent(com.almasb.fxgl.entity.component.CollidableComponent) Rectangle(javafx.scene.shape.Rectangle)

Example 10 with Rectangle

use of javafx.scene.shape.Rectangle in project FXGL by AlmasB.

the class FXShooterApp method initPlayer.

private void initPlayer() {
    player = new Entity();
    player.getPositionComponent().setValue(getWidth() / 2, getHeight() / 2);
    player.getViewComponent().setView(new Rectangle(40, 40, Color.BLUE));
    WeaponComponent weapon = new WeaponComponent();
    weapon.setDamage(2);
    weapon.setFireRate(1.0);
    weapon.setMaxAmmo(10);
    player.addComponent(weapon);
    playerControl = new PlayerControl();
    player.addControl(playerControl);
    getGameWorld().addEntity(player);
}
Also used : Entity(com.almasb.fxgl.entity.Entity) Rectangle(javafx.scene.shape.Rectangle)

Aggregations

Rectangle (javafx.scene.shape.Rectangle)135 Text (javafx.scene.text.Text)23 Entity (com.almasb.fxgl.entity.Entity)21 Point2D (javafx.geometry.Point2D)17 Circle (javafx.scene.shape.Circle)16 Group (javafx.scene.Group)13 Pane (javafx.scene.layout.Pane)13 Scene (javafx.scene.Scene)11 Color (javafx.scene.paint.Color)11 EntityView (com.almasb.fxgl.entity.view.EntityView)10 Label (javafx.scene.control.Label)10 HitBox (com.almasb.fxgl.physics.HitBox)8 TextFlow (javafx.scene.text.TextFlow)8 CollidableComponent (com.almasb.fxgl.entity.component.CollidableComponent)7 Node (javafx.scene.Node)7 PlayerControl (common.PlayerControl)6 Timeline (javafx.animation.Timeline)6 StackPane (javafx.scene.layout.StackPane)6 Stage (javafx.stage.Stage)6 Region (javafx.scene.layout.Region)5