forked from nus-cs2103-AY1920S1/addressbook-level3
-
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
10 changed files
with
228 additions
and
42 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
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 |
---|---|---|
@@ -0,0 +1,96 @@ | ||
package seedu.address.ui; | ||
|
||
import java.util.logging.Logger; | ||
|
||
import javafx.fxml.FXML; | ||
import javafx.scene.control.Button; | ||
import javafx.scene.control.Label; | ||
import javafx.stage.Stage; | ||
import seedu.address.commons.core.LogsCenter; | ||
|
||
/** | ||
* Controller for a help page | ||
*/ | ||
public class EmptyVisitList extends UiPart<Stage> { | ||
|
||
public static final String EMPTY_MESSAGE = "Patient has no past records!"; | ||
|
||
private static final Logger logger = LogsCenter.getLogger(HelpWindow.class); | ||
private static final String FXML = "EmptyVisitListWindow.fxml"; | ||
|
||
@FXML | ||
private Button backButton; | ||
|
||
@FXML | ||
private Label message; | ||
|
||
/** | ||
* Creates a new HelpWindow. | ||
* | ||
* @param root Stage to use as the root of the HelpWindow. | ||
*/ | ||
public EmptyVisitList(Stage root) { | ||
super(FXML, root); | ||
message.setText(EMPTY_MESSAGE); | ||
} | ||
|
||
/** | ||
* Creates a new HelpWindow. | ||
*/ | ||
public EmptyVisitList() { | ||
this(new Stage()); | ||
} | ||
|
||
/** | ||
* Shows the help window. | ||
* @throws IllegalStateException | ||
* <ul> | ||
* <li> | ||
* if this method is called on a thread other than the JavaFX Application Thread. | ||
* </li> | ||
* <li> | ||
* if this method is called during animation or layout processing. | ||
* </li> | ||
* <li> | ||
* if this method is called on the primary stage. | ||
* </li> | ||
* <li> | ||
* if {@code dialogStage} is already showing. | ||
* </li> | ||
* </ul> | ||
*/ | ||
public void show() { | ||
logger.fine("Showing help page about the application."); | ||
getRoot().show(); | ||
getRoot().centerOnScreen(); | ||
} | ||
|
||
/** | ||
* Returns true if the help window is currently being shown. | ||
*/ | ||
public boolean isShowing() { | ||
return getRoot().isShowing(); | ||
} | ||
|
||
/** | ||
* Hides the help window. | ||
*/ | ||
public void hide() { | ||
getRoot().hide(); | ||
} | ||
|
||
/** | ||
* Focuses on the help window. | ||
*/ | ||
public void focus() { | ||
getRoot().requestFocus(); | ||
} | ||
|
||
/** | ||
* Copies the URL to the user guide to the clipboard. | ||
*/ | ||
@FXML | ||
private void back() { | ||
this.hide(); | ||
} | ||
} |
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
Oops, something went wrong.