forked from nus-cs2103-AY1920S1/addressbook-level3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabbed panels #72
Merged
EugeneTeu
merged 8 commits into
AY1920S1-CS2103T-T09-4:master
from
EugeneTeu:tabbed-panels
Oct 4, 2019
Merged
Tabbed panels #72
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
feb9f44
created Tab Panel controller and FXML
EugeneTeu 75aae1d
manage to add Person list panel to tab 1
EugeneTeu aae5019
encapsulate logic inside TabPanel controller class
EugeneTeu aa478af
Merge branch 'master' of https://github.com/AY1920S1-CS2103T-T09-4/ma…
EugeneTeu e1cb133
dummy commit
EugeneTeu cb6784e
Merge branch 'master' of https://github.com/AY1920S1-CS2103T-T09-4/ma…
EugeneTeu 0756c33
add CSS, duplicate Model Logic fragment
EugeneTeu 913adf1
remove duplicate comments
EugeneTeu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
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,52 @@ | ||
package seedu.address.ui; | ||
|
||
import javafx.fxml.FXML; | ||
import javafx.scene.control.TabPane; | ||
import javafx.scene.layout.Region; | ||
import javafx.scene.layout.StackPane; | ||
import seedu.address.logic.Logic; | ||
|
||
/** | ||
* class containing TabPane class | ||
*/ | ||
public class TabPanel extends UiPart<Region> { | ||
private static final String FXML = "TabPanel.fxml"; | ||
|
||
private PersonListPanel personListPanel; | ||
private PersonListPanel personListPanel2; | ||
private PersonListPanel personListPanel3; | ||
private PersonListPanel personListPanel4; | ||
|
||
@FXML | ||
private StackPane phoneListPanelPlaceholder; | ||
|
||
@FXML | ||
private StackPane customerListPanelPlaceholder; | ||
|
||
@FXML | ||
private StackPane orderListPanelPlaceholder; | ||
@FXML | ||
private StackPane scheduleListPanelPlaceholder; | ||
|
||
@FXML | ||
private TabPane tabPanel; | ||
|
||
public TabPanel(Logic logic) { | ||
super(FXML); | ||
personListPanel = new PersonListPanel(logic.getFilteredPersonList()); | ||
customerListPanelPlaceholder.getChildren().add(personListPanel.getRoot()); | ||
|
||
personListPanel2 = new PersonListPanel(logic.getFilteredPersonList()); | ||
phoneListPanelPlaceholder.getChildren().add(personListPanel2.getRoot()); | ||
|
||
personListPanel3 = new PersonListPanel(logic.getFilteredPersonList()); | ||
orderListPanelPlaceholder.getChildren().add(personListPanel3.getRoot()); | ||
|
||
personListPanel4 = new PersonListPanel(logic.getFilteredPersonList()); | ||
scheduleListPanelPlaceholder.getChildren().add(personListPanel4.getRoot()); | ||
|
||
|
||
tabPanel.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE); | ||
} | ||
|
||
} |
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
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
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
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,8 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.ListView?> | ||
<?import javafx.scene.layout.VBox?> | ||
<?import javafx.scene.control.ListView?> | ||
<?import javafx.scene.layout.VBox?> | ||
|
||
<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | ||
<ListView fx:id="personListView" VBox.vgrow="ALWAYS" styleClass="pane-with-border"/> | ||
<ListView fx:id="personListView" VBox.vgrow="ALWAYS" styleClass="pane-with-border"/> | ||
</VBox> |
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
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,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.Tab?> | ||
<?import javafx.scene.control.TabPane?> | ||
<?import javafx.scene.layout.AnchorPane?> | ||
<?import javafx.scene.layout.VBox?> | ||
|
||
<?import javafx.scene.layout.StackPane?> | ||
<?import javafx.geometry.Insets?> | ||
<?import javafx.scene.control.Label?> | ||
<VBox xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> | ||
<TabPane fx:id="tabPanel" styleClass="STYLE_CLASS_FLOATING stack-pane"> | ||
<tabs> | ||
<Tab text="Customers" > | ||
<content> | ||
<VBox fx:id="customerList" styleClass="pane-with-border" minWidth="340" prefWidth="340" VBox.vgrow="ALWAYS"> | ||
<padding> | ||
<Insets top="20" right="0" bottom="0" left="0" /> | ||
</padding> | ||
<Label text="Customers"> </Label> | ||
<StackPane fx:id="customerListPanelPlaceholder" VBox.vgrow="ALWAYS"/> | ||
</VBox> | ||
</content> | ||
</Tab> | ||
<Tab text="Phones"> | ||
<content> | ||
<VBox fx:id="phoneList" styleClass="pane-with-border" minWidth="340" prefWidth="340" VBox.vgrow="ALWAYS"> | ||
<padding> | ||
<Insets top="20" right="0" bottom="0" left="0" /> | ||
</padding> | ||
<Label text="Phones"> </Label> | ||
<StackPane fx:id="phoneListPanelPlaceholder" VBox.vgrow="ALWAYS"/> | ||
</VBox> | ||
</content> | ||
</Tab> | ||
<Tab text="Order"> | ||
<content> | ||
<VBox fx:id="orderList" styleClass="pane-with-border" minWidth="340" prefWidth="340" VBox.vgrow="ALWAYS"> | ||
<padding> | ||
<Insets top="20" right="0" bottom="0" left="0" /> | ||
</padding> | ||
<Label text="Order"> </Label> | ||
<StackPane fx:id="orderListPanelPlaceholder" VBox.vgrow="ALWAYS"/> | ||
</VBox> | ||
</content> | ||
</Tab> | ||
<Tab text="Schedule"> | ||
<content> | ||
<VBox fx:id="scheduleList" styleClass="pane-with-border" minWidth="340" prefWidth="340" VBox.vgrow="ALWAYS"> | ||
<padding> | ||
<Insets top="20" right="0" bottom="0" left="0" /> | ||
</padding> | ||
<Label text="schedule"> </Label> | ||
<StackPane fx:id="scheduleListPanelPlaceholder" VBox.vgrow="ALWAYS"/> | ||
</VBox> | ||
</content> | ||
</Tab> | ||
</tabs></TabPane> | ||
</VBox> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to clean up commented-out lines later on.