Skip to content

Commit

Permalink
reverted to Java8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
thsa committed Jul 25, 2024
1 parent ec75d76 commit cfe717b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public void paintContent(GenericDrawContext context) {
mDepictor.paintDrawingObjects(context);
}

if (mCurrentHiliteAtom != -1 && !mAtomKeyStrokeBuffer.isEmpty()) {
if (mCurrentHiliteAtom != -1 && mAtomKeyStrokeBuffer.length() != 0) {
int x = (int)mMol.getAtomX(mCurrentHiliteAtom);
int y = (int)mMol.getAtomY(mCurrentHiliteAtom);
String s = mAtomKeyStrokeBuffer.toString();
Expand Down Expand Up @@ -951,7 +951,7 @@ private void showWarningMessage(String msg) {

private void eventHappened(GenericMouseEvent e) {
if (e.getWhat() == GenericMouseEvent.MOUSE_PRESSED) {
if (mCurrentHiliteAtom != -1 && !mAtomKeyStrokeBuffer.isEmpty())
if (mCurrentHiliteAtom != -1 && mAtomKeyStrokeBuffer.length() != 0)
expandAtomKeyStrokes(mAtomKeyStrokeBuffer.toString());

mAtomKeyStrokeBuffer.setLength(0);
Expand Down Expand Up @@ -1283,7 +1283,7 @@ else if (e.getKey() == 'v') {
}
} else if (mCurrentHiliteAtom != -1) {
int ch = e.getKey();
boolean isFirst = (mAtomKeyStrokeBuffer.isEmpty());
boolean isFirst = (mAtomKeyStrokeBuffer.length() == 0);
if (isFirst)
mFirstAtomKey = ch;
else {
Expand Down Expand Up @@ -2570,7 +2570,7 @@ private boolean trackHiliting(double x, double y, boolean isDragging){
|| hiliteObject != null);

if (mCurrentHiliteAtom != theAtom) {
if (mCurrentHiliteAtom != -1 && !mAtomKeyStrokeBuffer.isEmpty())
if (mCurrentHiliteAtom != -1 && mAtomKeyStrokeBuffer.length() != 0)
expandAtomKeyStrokes(mAtomKeyStrokeBuffer.toString());

mCurrentHiliteAtom = theAtom;
Expand Down

0 comments on commit cfe717b

Please sign in to comment.