Skip to content

Commit

Permalink
Renaming KeyboardEvent to InputEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
marigostra committed Jul 5, 2020
1 parent 02ad9cc commit de7a40c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions src/main/java/org/luwrain/app/news/ActionLists.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,29 @@ Action[] getGroupsActions(ListArea groupsArea)
{
if (groupsArea.selectedIndex() < 0)
return new Action[]{
new Action("add-group", strings.actionAddGroup(), new KeyboardEvent(KeyboardEvent.Special.INSERT)),
new Action("show-with-read-only", strings.actionShowWithReadOnly(), new KeyboardEvent('=')),
new Action("hide-with-read-only", strings.actionHideWithReadOnly(), new KeyboardEvent('-')),
new Action("fetch", strings.actionFetch(), new KeyboardEvent(KeyboardEvent.Special.F9)),
new Action("add-group", strings.actionAddGroup(), new InputEvent(InputEvent.Special.INSERT)),
new Action("show-with-read-only", strings.actionShowWithReadOnly(), new InputEvent('=')),
new Action("hide-with-read-only", strings.actionHideWithReadOnly(), new InputEvent('-')),
new Action("fetch", strings.actionFetch(), new InputEvent(InputEvent.Special.F9)),
};
return new Action[]{
new Action("add-group", strings.actionAddGroup(), new KeyboardEvent(KeyboardEvent.Special.INSERT)),
new Action("delete-group", strings.actionDeleteGroup(), new KeyboardEvent(KeyboardEvent.Special.DELETE)),
new Action("mark-all-as-read", strings.actionMarkAllAsRead()/*, new KeyboardEvent(KeyboardEvent.Special.DELETE)*/), //FIXME: shift+delete
new Action("show-with-read-only", strings.actionShowWithReadOnly(), new KeyboardEvent('=')),
new Action("hide-with-read-only", strings.actionHideWithReadOnly(), new KeyboardEvent('-')),
new Action("fetch", strings.actionFetch(), new KeyboardEvent(KeyboardEvent.Special.F9)),
new Action("add-group", strings.actionAddGroup(), new InputEvent(InputEvent.Special.INSERT)),
new Action("delete-group", strings.actionDeleteGroup(), new InputEvent(InputEvent.Special.DELETE)),
new Action("mark-all-as-read", strings.actionMarkAllAsRead()/*, new InputEvent(InputEvent.Special.DELETE)*/), //FIXME: shift+delete
new Action("show-with-read-only", strings.actionShowWithReadOnly(), new InputEvent('=')),
new Action("hide-with-read-only", strings.actionHideWithReadOnly(), new InputEvent('-')),
new Action("fetch", strings.actionFetch(), new InputEvent(InputEvent.Special.F9)),
};
}

Action[] getSummaryActions(ListArea summaryArea)
{
if (summaryArea.selectedIndex() < 0)
return new Action[]{
new Action("fetch", strings.actionFetch(), new KeyboardEvent(KeyboardEvent.Special.F9)),
new Action("fetch", strings.actionFetch(), new InputEvent(InputEvent.Special.F9)),
};
return new Action[]{
new Action("fetch", strings.actionFetch(), new KeyboardEvent(KeyboardEvent.Special.F9)),
new Action("fetch", strings.actionFetch(), new InputEvent(InputEvent.Special.F9)),
new Action("read-article", strings.actionReadArticle()),
new Action("mark-article", strings.actionMarkArticle()),
new Action("unmark-article", strings.actionUnmarkArticle()),
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/luwrain/app/news/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void createAreas()
luwrain.setActiveArea(summaryArea);
return true;
})) {
@Override public boolean onInputEvent(KeyboardEvent event)
@Override public boolean onInputEvent(InputEvent event)
{
NullCheck.notNull(event, "event");
if (event.isSpecial() && !event.isModified())
Expand Down Expand Up @@ -132,7 +132,7 @@ private void createAreas()
};

this.summaryArea = new ListArea(base.createSummaryParams((area, index, obj)->actions.onSummaryClick(summaryArea, groupsArea, viewArea, obj))) {
@Override public boolean onInputEvent(KeyboardEvent event)
@Override public boolean onInputEvent(InputEvent event)
{
NullCheck.notNull(event, "event");
if (event.isSpecial() && !event.isModified())
Expand Down Expand Up @@ -181,7 +181,7 @@ private void createAreas()
final ReaderArea.Params viewParams = new ReaderArea.Params();
viewParams.context = new DefaultControlContext(luwrain);
this.viewArea = new ReaderArea(viewParams){
@Override public boolean onInputEvent(KeyboardEvent event)
@Override public boolean onInputEvent(InputEvent event)
{
NullCheck.notNull(event, "event");
if (event.isSpecial() && !event.isModified())
Expand Down Expand Up @@ -235,7 +235,7 @@ private boolean showGroupProps()
return false;
final GroupWrapper wrapper = (GroupWrapper)obj;
final FormArea area = new FormArea(new DefaultControlContext(luwrain), strings.groupPropertiesAreaName(wrapper.group.getName())) {
@Override public boolean onInputEvent(KeyboardEvent event)
@Override public boolean onInputEvent(InputEvent event)
{
NullCheck.notNull(event, "event");
if (event.isSpecial() && !event.isModified())
Expand Down

0 comments on commit de7a40c

Please sign in to comment.