forked from devonfw/cobigen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devonfw#1454 Implemented TemplateSetDetails Page to be ready for Temp…
…late Set Data
- Loading branch information
Showing
7 changed files
with
177 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 86 additions & 1 deletion
87
cobigen/gui/src/main/java/com/devonfw/cobigen/gui/controllers/DetailsController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,94 @@ | ||
package com.devonfw.cobigen.gui.controllers; | ||
|
||
import java.net.URL; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.ResourceBundle; | ||
|
||
import com.devonfw.cobigen.gui.services.TreeViewBuilder; | ||
|
||
import javafx.fxml.FXML; | ||
import javafx.fxml.Initializable; | ||
import javafx.scene.control.TreeView; | ||
import javafx.scene.layout.AnchorPane; | ||
|
||
/** | ||
* TODO nneuhaus This type ... | ||
* | ||
*/ | ||
public class DetailsController { | ||
public class DetailsController implements Initializable { | ||
|
||
// TODO: getIncrements() | ||
private List<String> INCREMENTS = new ArrayList<>(); | ||
|
||
@FXML | ||
AnchorPane treeViewPane; | ||
|
||
@Override | ||
public void initialize(URL location, ResourceBundle resources) { | ||
|
||
showName(); | ||
showVersion(); | ||
showTreeView(TreeViewBuilder.buildTreeView(TreeViewBuilder.transformIncrementsToArray(this.INCREMENTS))); | ||
|
||
} | ||
|
||
/** | ||
* | ||
*/ | ||
private void showName() { | ||
|
||
// TODO: getName() | ||
|
||
} | ||
|
||
/** | ||
* | ||
*/ | ||
private void showVersion() { | ||
|
||
// TODO: getVersion() | ||
|
||
} | ||
|
||
/** | ||
* @param treeView | ||
*/ | ||
public void showTreeView(TreeView<String> treeView) { | ||
|
||
treeView.setId("treeView"); | ||
AnchorPane.setTopAnchor(treeView, 0.0); | ||
AnchorPane.setRightAnchor(treeView, 0.0); | ||
AnchorPane.setBottomAnchor(treeView, 0.0); | ||
AnchorPane.setLeftAnchor(treeView, 0.0); | ||
this.treeViewPane.getChildren().add(treeView); | ||
} | ||
|
||
/** | ||
* @param actionEvent | ||
*/ | ||
@FXML | ||
public void installTemplateSet(javafx.event.ActionEvent actionEvent) { | ||
|
||
// TODO | ||
} | ||
|
||
/** | ||
* @param actionEvent | ||
*/ | ||
@FXML | ||
public void updateTemplateSet(javafx.event.ActionEvent actionEvent) { | ||
|
||
// TODO | ||
} | ||
|
||
/** | ||
* @param actionEvent | ||
*/ | ||
@FXML | ||
public void uninstallTemplateSet(javafx.event.ActionEvent actionEvent) { | ||
|
||
// TODO | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
cobigen/gui/src/main/resources/com/devonfw/cobigen/gui/TemplateSetDetails.fxml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
cobigen/gui/src/main/resources/com/devonfw/cobigen/gui/fxml/TemplateSetDetails.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.Button?> | ||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.control.MenuItem?> | ||
<?import javafx.scene.control.ScrollPane?> | ||
<?import javafx.scene.control.Separator?> | ||
<?import javafx.scene.control.SplitMenuButton?> | ||
<?import javafx.scene.control.SplitPane?> | ||
<?import javafx.scene.layout.AnchorPane?> | ||
<?import javafx.scene.text.Font?> | ||
<?import javafx.scene.text.Text?> | ||
|
||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="459.0" prefWidth="455.0" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1"> | ||
<children> | ||
<SplitPane dividerPositions="0.17514534883720928" orientation="VERTICAL" prefHeight="461.0" prefWidth="432.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | ||
<items> | ||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0"> | ||
<children> | ||
<Text layoutX="14.0" layoutY="31.0" strokeType="OUTSIDE" strokeWidth="0.0" text="TITLE OF TEMPLATE SET" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="10.0"> | ||
<font> | ||
<Font size="18.0" /> | ||
</font> | ||
</Text> | ||
<AnchorPane layoutX="256.0" layoutY="13.0" prefHeight="25.0" prefWidth="100.0" style="-fx-background-color: GREY; -fx-background-radius: 5px;" AnchorPane.rightAnchor="70.0" AnchorPane.topAnchor="10.0"> | ||
<children> | ||
<Text fill="WHITE" layoutX="9.0" layoutY="17.0" strokeType="OUTSIDE" strokeWidth="0.0" text="UNINSTALLED" textAlignment="CENTER"> | ||
<font> | ||
<Font name="System Bold" size="12.0" /> | ||
</font> | ||
</Text> | ||
</children> | ||
</AnchorPane> | ||
<Button layoutX="367.0" layoutY="13.0" mnemonicParsing="false" style="-fx-background-color: BLUE;" text="Install" textFill="WHITE" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="10.0"> | ||
<font> | ||
<Font name="System Bold" size="12.0" /> | ||
</font> | ||
</Button> | ||
<Text layoutX="14.0" layoutY="55.0" strokeType="OUTSIDE" strokeWidth="0.0" text=""Short Description in one sentence"" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="45.0" /> | ||
<SplitMenuButton layoutX="328.0" layoutY="44.0" mnemonicParsing="false" style="-fx-background-color: BLUE;" text=""Version"" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="42.0"> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="v1.2" /> | ||
<MenuItem mnemonicParsing="false" text="v3" /> | ||
</items> | ||
</SplitMenuButton> | ||
</children> | ||
</AnchorPane> | ||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0"> | ||
<children> | ||
<Label layoutX="4.0" layoutY="14.0" text="Template Set Structure" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0"> | ||
<font> | ||
<Font size="14.0" /> | ||
</font> | ||
</Label> | ||
<Separator layoutY="28.0" prefHeight="0.0" prefWidth="453.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="30.0" /> | ||
<AnchorPane prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="40.0"> | ||
<children> | ||
<ScrollPane fitToWidth="true" prefHeight="200.0" prefWidth="433.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | ||
<content> | ||
<AnchorPane fx:id="treeViewPane" minHeight="0.0" minWidth="0.0" prefHeight="326.0" prefWidth="417.0" /> | ||
</content> | ||
</ScrollPane> | ||
</children> | ||
</AnchorPane> | ||
</children> | ||
</AnchorPane> | ||
</items> | ||
</SplitPane> | ||
</children> | ||
</AnchorPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters