forked from nus-cs2103-AY1819S1/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
262 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package seedu.address.ui; | ||
|
||
import com.google.common.eventbus.Subscribe; | ||
|
||
import javafx.fxml.FXML; | ||
import javafx.scene.control.Label; | ||
import javafx.scene.layout.Region; | ||
|
||
import seedu.address.commons.events.ui.ContextChangeEvent; | ||
import seedu.address.model.Context; | ||
|
||
/** | ||
* An UI component that displays information of the {@code Context}. | ||
*/ | ||
public class ContextIndicator extends UiPart<Region> { | ||
|
||
private static final String FXML = "ContextIndicator.fxml"; | ||
|
||
@FXML | ||
private Label contextName; | ||
|
||
public ContextIndicator(String contextId) { | ||
super(FXML); | ||
setContextName(contextId); | ||
registerAsAnEventHandler(this); | ||
} | ||
|
||
@Subscribe | ||
private void handleContextChangeEvent(ContextChangeEvent event) { | ||
System.out.println(event.getNewContext()); | ||
setContextName(event.getNewContext()); | ||
} | ||
|
||
private void setContextName(String contextId) { | ||
if (contextId.equals(Context.VOLUNTEER_CONTEXT_ID)) { | ||
contextName.setText(Context.VOLUNTEER_CONTEXT_NAME.substring(0, 1).toUpperCase() | ||
+ Context.VOLUNTEER_CONTEXT_NAME.substring(1)); | ||
} else if (contextId.equals(Context.EVENT_CONTEXT_ID)) { | ||
contextName.setText(Context.EVENT_CONTEXT_NAME.substring(0, 1).toUpperCase() | ||
+ Context.EVENT_CONTEXT_NAME.substring(1)); | ||
} else if (contextId.equals(Context.RECORD_CONTEXT_ID)) { | ||
contextName.setText(Context.RECORD_CONTEXT_NAME.substring(0, 1).toUpperCase() | ||
+ Context.RECORD_CONTEXT_NAME.substring(1)); | ||
} | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.layout.HBox?> | ||
|
||
<HBox id="contextIndicator" fx:id="contextIndicator" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | ||
<Label id="contextName" fx:id="contextName" styleClass="cell_big_label"></Label> | ||
</HBox> | ||
|
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,179 @@ | ||
.root { | ||
-black-1-: #0c0c0c; | ||
-grey-1-: #212121; | ||
-grey-2-: #303030; | ||
-grey-3-: #424242; | ||
-grey-4-: #e6e6e6; | ||
-white-1-: #F5F5F5; | ||
|
||
-primary-: #3E50B4; | ||
-secondary-: #FF3F80; | ||
|
||
-font-: #98a6ad; | ||
-background-: #323b44; | ||
-card-: #36404a; | ||
|
||
-yellow-primary-: #FFDE03; | ||
-blue-primary-: #0336FF; | ||
-red-primary-: #FF0266; | ||
|
||
-blue-1-: #004ba0; | ||
-blue-2-: #1976d2; | ||
-blue-3-: #63a4ff; | ||
-blue-n-: #0081cb; | ||
|
||
-grey-b-: #E1E2E1; | ||
-grey-s-: #969696; | ||
|
||
-swatch-100: #BBDEFB; | ||
-swatch-200: #90CAF9; | ||
-swatch-300: #64BEF6; | ||
-swatch-400: #42A5F5; | ||
-swatch-500: #2196F3; | ||
-swatch-grey: #c8c8c8; | ||
-swatch-dark-grey: #969696; | ||
-swatch-light-grey: #e6e6e6; | ||
-swatch-toolbar: #F5F5F5; | ||
-swatch-toolbar-selected: #D7D7D7; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Open Sans'; | ||
src: url('../fonts/OpenSans-Regular.ttf'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'IBM Plex Sans'; | ||
src: url('../fonts/IBMPlexSans-Regular.ttf'); | ||
} | ||
|
||
.background { | ||
-fx-background-color: -grey-b-; | ||
background-color: -grey-b-; /* Used in the default.html file */ | ||
} | ||
|
||
.menu-bar { | ||
-fx-background-color: -blue-1-; | ||
} | ||
|
||
.grid-pane .stack-pane { | ||
-fx-background-color: -blue-1-; | ||
} | ||
|
||
#contextIndicator { | ||
-fx-font-family: "Open Sans"; | ||
-fx-background-color: -blue-2-; | ||
-fx-padding: 10 10 10 10; | ||
} | ||
|
||
#contextIndicator .label { | ||
-fx-font-size: 1.5em; | ||
-fx-padding: 5 5 5 8; | ||
-fx-text-fill: -white-1-; | ||
} | ||
|
||
#browserPlaceholder { | ||
-fx-padding: 12; | ||
-fx-background-color: -background-; | ||
-fx-background-insets: 0px, 10px; | ||
-fx-border-radius: 2; | ||
-fx-effect: dropshadow(gaussian, rgb(0.0, 0.0, 0.0, 0.15), 6.0, 0.7, 0.0, 1.5); | ||
} | ||
|
||
.split-pane:horizontal .split-pane-divider { | ||
-fx-padding: 1 0 1 0; | ||
-fx-background-insets: 0; | ||
-fx-border-color: transparent; | ||
-fx-background-color: -background-; | ||
} | ||
|
||
|
||
.split-pane { | ||
-fx-box-boder: transparent; | ||
-fx-padding: 0; | ||
-fx-background-inset: 0; | ||
-fx-border-radius: 0; | ||
-fx-border-width: 0; | ||
-fx-background-color: transparent; | ||
} | ||
|
||
.list-view { | ||
-fx-background-insets: 0; | ||
-fx-padding: 0px; | ||
-fx-background-color: -grey-b-; | ||
} | ||
|
||
.list-cell { | ||
-fx-padding: 12px; | ||
-fx-background-color: transparent, -white-1-; | ||
-fx-background-insets: 0px, 0px; | ||
-fx-border-radius: 1; | ||
-fx-border-width: 0 0 1 0; | ||
-fx-border-color: -grey-b-; | ||
} | ||
|
||
.list-cell:empty { | ||
-fx-padding: 2px; | ||
-fx-background-color: transparent; | ||
-fx-background-insets: 0; | ||
} | ||
|
||
.list-cell:filled:hover { | ||
-fx-background-color: transparent, rgb(200.0, 200.0, 200.0); | ||
} | ||
|
||
.list-cell:filled:selected { | ||
-fx-background-color: transparent, derive(#42A5F5, 50%); | ||
} | ||
|
||
.list-cell:filled:selected #cardPane { | ||
-fx-border-color: #3080e8; | ||
-fx-border-width: 0 0 0 0; | ||
} | ||
|
||
.list-cell .label { | ||
-fx-text-fill: -grey-1-; | ||
-fx-font-family: "IBM Plex Sans"; | ||
} | ||
|
||
.scroll-bar:vertical>.track-background, .scroll-bar:horizontal>.track-background | ||
{ | ||
-fx-background-color: -grey-b-; | ||
-fx-background-insets: 1 0 0 0; | ||
} | ||
|
||
.scroll-bar:vertical>.thumb, .scroll-bar:horizontal>.thumb { | ||
-fx-background-color: -grey-s-; | ||
-fx-background-insets: 0; | ||
-fx-background-radius: 0; | ||
} | ||
|
||
.scroll-bar>.increment-button, .scroll-bar>.decrement-button, | ||
.scroll-bar:hover>.increment-button, .scroll-bar:hover>.decrement-button | ||
{ | ||
-fx-background-color: transparent; | ||
} | ||
|
||
.scroll-bar>.increment-button>.increment-arrow, .scroll-bar>.decrement-button>.decrement-arrow | ||
{ | ||
-fx-background-color: -grey-s-; | ||
} | ||
|
||
.scroll-bar>.track-background { | ||
-fx-background-color: transparent; | ||
} | ||
|
||
|
||
#totalVolunteersStatus exit.label { | ||
-fx-alignment: center; | ||
} | ||
|
||
#eventNameBox .label{ | ||
-fx-font-size: 18pt; | ||
-fx-text-fill: -grey-1-; | ||
} | ||
|
||
#numOfVolunteerBox .label{ | ||
-fx-font-size: 14pt; | ||
-fx-text-fill: -grey-1-; | ||
} |
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
Oops, something went wrong.