Skip to content

Commit

Permalink
Merge pull request #246 from CS2103AUG2016-W11-C3/UpdatingHelpTable
Browse files Browse the repository at this point in the history
Updating help table
  • Loading branch information
bertojo authored Nov 7, 2016
2 parents 0858153 + 9e50fd2 commit 46cd53d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public class FindTagCommand extends Command {
+ "the specified keywords (case-sensitive) and displays them as a list with index numbers.\n\t"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n\t"
+ "Example: " + COMMAND_WORD + " meal finals";

public static final String COMMAND_FORMAT = COMMAND_WORD + " <keywords>...";
public static final String COMMAND_DESCRIPTION = "Finds all tasks whose tags contain any of the specified keywords "
+ "(case-sensitive)";

private final Set<Tag> keywords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ private void initCommandWords() {
commandList.add(RedoCommand.COMMAND_WORD);
commandList.add(ListCommand.COMMAND_WORD);
commandList.add(FindCommand.COMMAND_WORD);
commandList.add(FindTagCommand.COMMAND_WORD);
commandList.add(UpcomingCommand.COMMAND_WORD);
commandList.add(RelocateCommand.COMMAND_WORD);
commandList.add(ImportCommand.COMMAND_WORD);
Expand All @@ -81,6 +82,7 @@ private void initFormat() {
formatList.add(RedoCommand.COMMAND_WORD);
formatList.add(ListCommand.COMMAND_FORMAT);
formatList.add(FindCommand.COMMAND_FORMAT);
formatList.add(FindTagCommand.COMMAND_FORMAT);
formatList.add(UpcomingCommand.COMMAND_FORMAT);
formatList.add(RelocateCommand.COMMAND_FORMAT);
formatList.add(ImportCommand.COMMAND_FORMAT);
Expand All @@ -102,6 +104,7 @@ private void initDescription() {
descriptionList.add(RedoCommand.COMMAND_DESCRIPTION);
descriptionList.add(ListCommand.COMMAND_DESCRIPTION);
descriptionList.add(FindCommand.COMMAND_DESCRIPTION);
descriptionList.add(FindTagCommand.COMMAND_DESCRIPTION);
descriptionList.add(UpcomingCommand.COMMAND_DESCRIPTION);
descriptionList.add(RelocateCommand.COMMAND_DESCRIPTION);
descriptionList.add(ImportCommand.COMMAND_DESCRIPTION);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/harmony/mastermind/ui/HomeTableView.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public TableView<ReadOnlyTask> getTableView(){
* Initializes the indexing of tasks
*/
protected void initIndex() {
indexColumn.setSortable(false);
indexColumn.prefWidthProperty().bind(homeTableView.widthProperty().multiply(WIDTH_MULTIPLIER_INDEX));
indexColumn.setCellFactory(column -> renderIndexCell());
}
Expand All @@ -119,6 +120,7 @@ protected void initIndex() {
* Initialize the Names of the tasks
*/
protected void initName() {
nameColumn.setSortable(false);
nameColumn.prefWidthProperty().bind(homeTableView.widthProperty().multiply(WIDTH_MULTIPLIER_NAME));
nameColumn.setCellValueFactory(cellValue -> new SimpleObjectProperty<>(cellValue.getValue()));
nameColumn.setCellFactory(col -> renderNameCell());
Expand All @@ -129,6 +131,7 @@ protected void initName() {
* Initialize the start dates of the tasks
*/
protected void initStartDate() {
startDateColumn.setSortable(false);
startDateColumn.prefWidthProperty().bind(homeTableView.widthProperty().multiply(WIDTH_MULTIPLIER_STARTDATE));
startDateColumn.setCellValueFactory(cellValue -> new SimpleObjectProperty<>(cellValue.getValue()));

Expand All @@ -141,6 +144,7 @@ protected void initStartDate() {
* Initialize the end dates of the tasks
*/
protected void initEndDate() {
endDateColumn.setSortable(false);
endDateColumn.prefWidthProperty().bind(homeTableView.widthProperty().multiply(WIDTH_MULTIPLIER_ENDDATE));
endDateColumn.setCellValueFactory(cellValue -> new SimpleObjectProperty<>(cellValue.getValue()));

Expand All @@ -153,6 +157,7 @@ protected void initEndDate() {
* Initialize the tags of the tasks
*/
protected void initTags() {
tagsColumn.setSortable(false);
tagsColumn.prefWidthProperty().bind(homeTableView.widthProperty().multiply(WIDTH_MULTIPLIER_TAGS));
tagsColumn.setCellValueFactory(cellValue -> new SimpleObjectProperty<>(cellValue.getValue()));

Expand All @@ -165,6 +170,7 @@ protected void initTags() {
* Initialize a checkbox to determine whether task is recurring
*/
protected void initRecur() {
recurColumn.setSortable(false);
recurColumn.prefWidthProperty().bind(homeTableView.widthProperty().multiply(WIDTH_MULTIPLIER_RECUR));
recurColumn.setGraphic(new ImageView("file:src/main/resources/images/recur_white.png"));
recurColumn.setCellValueFactory(task -> new SimpleBooleanProperty(task.getValue().isRecur()));
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/harmony/mastermind/logic/HelpCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
//@@author A0139194X
public class HelpCommandTest {

private final int NUM_ENTRIES = 17;
//Number of commands is 18
private final int NUM_ENTRIES = 18;

@Test
public void initInfo_success() {
Expand Down

0 comments on commit 46cd53d

Please sign in to comment.