Skip to content

Commit

Permalink
Google Java Format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Apr 18, 2023
1 parent ef9d428 commit df7128b
Showing 1 changed file with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1173,10 +1173,10 @@ private void labelSetDateToTodayMousePressed(MouseEvent e) {
private void populateYearPopupMenu() {
populateYearPopupMenu(displayedYearMonth.getYear());
}

/**
* populateYearPopupMenu, Create entries of year PopUpMenu matching the passed year,
* entries have to be updated every time the selected year changes
* populateYearPopupMenu, Create entries of year PopUpMenu matching the passed year, entries have
* to be updated every time the selected year changes
*/
private void populateYearPopupMenu(int middleYear) {
final int firstYearDifference = -11;
Expand All @@ -1185,16 +1185,16 @@ private void populateYearPopupMenu(int middleYear) {
popupYear.removeAll();
// Add up arrow to show earlier years.
popupYear.add(
new JMenuItem(
//black up-pointing triangle
new AbstractAction("\u25b2") {
@Override
public void actionPerformed(ActionEvent e) {
populateYearPopupMenu(middleYear - displayedYearCount);
Point menuLocation = getMonthOrYearMenuLocation(labelYear, popupYear);
popupYear.show(monthAndYearInnerPanel, menuLocation.x, menuLocation.y);
}
}));
new JMenuItem(
// black up-pointing triangle
new AbstractAction("\u25b2") {
@Override
public void actionPerformed(ActionEvent e) {
populateYearPopupMenu(middleYear - displayedYearCount);
Point menuLocation = getMonthOrYearMenuLocation(labelYear, popupYear);
popupYear.show(monthAndYearInnerPanel, menuLocation.x, menuLocation.y);
}
}));
for (int yearDifference = firstYearDifference;
yearDifference <= lastYearDifference;
++yearDifference) {
Expand All @@ -1219,16 +1219,16 @@ public void actionPerformed(ActionEvent e) {
}
// Add down arrow to show later years.
popupYear.add(
new JMenuItem(
//black down-pointing triangle
new AbstractAction("\u25bc") {
@Override
public void actionPerformed(ActionEvent e) {
populateYearPopupMenu(middleYear + displayedYearCount);
Point menuLocation = getMonthOrYearMenuLocation(labelYear, popupYear);
popupYear.show(monthAndYearInnerPanel, menuLocation.x, menuLocation.y);
}
}));
new JMenuItem(
// black down-pointing triangle
new AbstractAction("\u25bc") {
@Override
public void actionPerformed(ActionEvent e) {
populateYearPopupMenu(middleYear + displayedYearCount);
Point menuLocation = getMonthOrYearMenuLocation(labelYear, popupYear);
popupYear.show(monthAndYearInnerPanel, menuLocation.x, menuLocation.y);
}
}));
final String choiceOtherYearString = "( . . . )";
popupYear.add(
new JMenuItem(
Expand Down

0 comments on commit df7128b

Please sign in to comment.