Skip to content

Commit

Permalink
added Design specifications for the GUI, debugged loadDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
leonie committed Dec 7, 2022
1 parent 3c6955c commit 2946849
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 12 deletions.
14 changes: 10 additions & 4 deletions cobigen/gui/src/main/java/com/devonfw/cobigen/gui/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,16 @@ public void loadDetails() throws IOException {
// TODO: getIncrements() for Tree View when #1517 is merged
// Add parameter Increments

this.home.setVisible(false);
this.details.setVisible(true);
String templateSetTitle = this.menuController.searchResultsView.getSelectionModel().getSelectedItem().getName();
this.detailsController.showName(templateSetTitle);
TemplateSet selectedItem = this.menuController.searchResultsView.getSelectionModel().getSelectedItem();

if (selectedItem == null) {
this.home.setVisible(true);
this.details.setVisible(false);
} else {
this.home.setVisible(false);
this.details.setVisible(true);
this.detailsController.showName(selectedItem.getName());
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
</font>
</Text>
<Separator layoutY="24.0" prefHeight="16.0" prefWidth="455.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="24.0" />
<Button layoutX="58.0" layoutY="71.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="7.0" style="-fx-background-color: BLUE;" text="+" textFill="WHITE" AnchorPane.leftAnchor="58.0">
<Button styleClass= "menuButtons" layoutX="58.0" layoutY="71.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="7.0" text="+" textFill="WHITE" AnchorPane.leftAnchor="58.0">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
<Button layoutX="213.0" layoutY="71.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="7.0" style="-fx-background-color: BLUE;" text="*" textFill="WHITE" AnchorPane.leftAnchor="211.0" AnchorPane.rightAnchor="211.0">
<Button styleClass= "menuButtons" layoutX="213.0" layoutY="71.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="7.0" text="*" textFill="WHITE" AnchorPane.leftAnchor="211.0" AnchorPane.rightAnchor="211.0">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
<Button layoutX="348.0" layoutY="71.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="7.0" style="-fx-background-color: BLUE;" text="~" textFill="WHITE" AnchorPane.rightAnchor="68.0">
<Button styleClass= "menuButtons" layoutX="348.0" layoutY="71.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="7.0" text="~" textFill="WHITE" AnchorPane.rightAnchor="68.0">
<font>
<Font name="System Bold" size="12.0" />
</font>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,35 @@
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>

<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="360.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="30.0" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.devonfw.cobigen.gui.controllers.MenuController">
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="360.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="30.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.devonfw.cobigen.gui.controllers.MenuController">
<children>

<AnchorPane fx:id="menuPane" minHeight="0.0" minWidth="0.0" prefHeight="358.0" prefWidth="200.0" AnchorPane.bottomAnchor="-45.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<AnchorPane fx:id="menuBarPane" layoutY="1.0" prefHeight="25.0" prefWidth="207.0" styleClass="menu-bar" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label fx:id="templateSetsLabel" text="Template Sets" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="4.0" />
<Button fx:id="homeButton" layoutX="128.0" layoutY="-1.0" mnemonicParsing="false" text="#" AnchorPane.rightAnchor="84.0" AnchorPane.topAnchor="0.0">

<Button fx:id="homeButton" layoutX="82.0" layoutY="2.0" maxHeight="15.0" maxWidth="15.0" minHeight="25.0" minWidth="25.0" mnemonicParsing="false" prefHeight="15.0" prefWidth="15.0" AnchorPane.rightAnchor="86.0">
<tooltip>
<Tooltip fx:id="homeTooltip" text="Home" />
</tooltip>
<graphic>
<ImageView fx:id="homeButtonImageView" fitHeight="16.0" fitWidth="27.0" preserveRatio="true" styleClass="icon">
<Image fx:id="homeButtonIcon" url="@../icons/home.png" />
</ImageView>
</graphic>
</Button>
<Button fx:id="refreshButton" mnemonicParsing="false" text="+" onAction="#refresh" AnchorPane.rightAnchor="59.0" AnchorPane.topAnchor="0.0">
<Button fx:id="refreshButton" layoutX="114.0" layoutY="1.0" maxHeight="15.0" maxWidth="15.0" mnemonicParsing="false" onAction="#refresh" prefHeight="15.0" prefWidth="15.0" text="+" AnchorPane.rightAnchor="62.0" AnchorPane.topAnchor="1.0">
<tooltip>
<Tooltip fx:id="refreshTooltip" text="Refresh" />
</tooltip>
</Button>
<MenuButton fx:id="filterMenuButton" mnemonicParsing="false" text="Filter" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<MenuButton fx:id="filterMenuButton" layoutX="138.0" layoutY="1.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="60.0" text="Filter" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="1.0">
<items>
<Menu fx:id="viewsMenu" mnemonicParsing="false" text="Views">
<items>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */

/* makes button and filter option white and borderless*/
.root {
-fx-body-color : white;
-fx-outer-border : white;

}
.root * {
-fx-font: 11px Ubuntu;
-fx-focus-color: transparent;
-fx-faint-focus-color: transparent;
-fx-base: white;
-fx-accent: #0070AD;
}

.scroll-bar {
-fx-background-color: white;
-fx-block-increment: 1;
}

/* sets the color when cursor hovers over button*/
color-picker:hover,
.date-picker:hover > .arrow-button,
.combo-box:hover,.choice-box:hover,
.number-button:hover,.left-arrow-button:hover,.right-arrow-button:hover,
.button:hover,.menu-button:hover,.toggle-button:hover,
.font-menu-button:hover,
.split-menu-button > .label:hover, .split-menu-button > .arrow-button:hover {
-fx-background-color: #ececec;

}

/*pressed selected*/
.color-picker:pressed,.color-picker:selected,
.number-button:pressed,.number-button:selected,
.date-picker:pressed > .arrow-button,
.combo-box:pressed > .arrow-button,.combo-box:selected > .arrow-button,
.choice-box:pressed > .arrow-button,.choice-box:selected > .arrow-button,
.font-menu-button:pressed,.font-menu-button:selected,
.left-arrow-button:pressed,.left-arrow-button:selected,
.right-arrow-button:pressed,.right-arrow-button:selected,
.button:pressed, .button:selected,.menu-button:pressed,.menu-button:selected
,.toggle-button:pressed,.toggle-button:selected,
.split-menu-button:pressed > .label, .split-menu-button > .arrow-button:pressed {
-fx-background-color: #D3D3D3
}

#menuBarPane{
-fx-background-color: white;
}

#templateSetsLabel{
-fx-background-color: transparent;

}
#headersText{
-fx-font-size: 20px;
}

#homeButtonIcon{
-fx-scale-x: 0.1;
-fx-scale-y: 0.1;
}

.menuButtons{
-fx-background-color: #2B0A3D
}

0 comments on commit 2946849

Please sign in to comment.