Skip to content

Commit

Permalink
Added visibility checks to getBaseline() functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakeTNC committed Dec 11, 2016
1 parent 7825487 commit dbb61f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ public JButton getComponentToggleCalendarButton() {
*/
@Override
public int getBaseline(int width, int height) {
return dateTextField.getBaseline(width, height);
if (dateTextField.isVisible()) {
return dateTextField.getBaseline(width, height);
}
return super.getBaseline(width, height);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,10 @@ public void closePopup() {
*/
@Override
public int getBaseline(int width, int height) {
return timeTextField.getBaseline(width, height);
if (timeTextField.isVisible()) {
return timeTextField.getBaseline(width, height);
}
return super.getBaseline(width, height);
}

/**
Expand Down

0 comments on commit dbb61f4

Please sign in to comment.