diff options
| author | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2008-02-28 11:26:04 +0000 |
|---|---|---|
| committer | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2008-02-28 11:26:04 +0000 |
| commit | 396cb1e1025d59e679b187aaa2971ea42c4c1c58 (patch) | |
| tree | 6fc9b7bba7346a56379bdd13b7690bee97b70404 /j2kviewer/src/MML.java | |
| parent | ac0cc6df623f02e21fb9eb950e73237c794f4a89 (diff) | |
Removed the J2KViewer module, which has been replaced by OPJViewer and fixed the error handling of j2k_decode in jp2.c, thanks to Robin Cornelius
Diffstat (limited to 'j2kviewer/src/MML.java')
| -rw-r--r-- | j2kviewer/src/MML.java | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/j2kviewer/src/MML.java b/j2kviewer/src/MML.java deleted file mode 100644 index 7c49ff2f..00000000 --- a/j2kviewer/src/MML.java +++ /dev/null @@ -1,85 +0,0 @@ -import java.awt.event.*; - -class MML implements MouseMotionListener, MouseListener -{ - public void mouseExited(MouseEvent e) {} - public void mouseEntered(MouseEvent e) {} - public void mouseClicked(MouseEvent e) {} - - private ImageViewer applet; - private int x1, y1, x2, y2, zf, btn; - private boolean zoomrq; - - public MML(ImageViewer iv) - { - x1 = y1 = -1; - applet = iv; - zoomrq = false; - zf = 0; - } - - private boolean isInside(int x, int y) - { - x -= applet.getX(); - y -= applet.getY(); - return (x >= 0) && (x < applet.getWidth()) - && (y >= 0) && (y < applet.getHeight()); - } - - public void mousePressed(MouseEvent e) - { - btn = e.getButton(); - if (applet.isInsideRect(e.getX(), e.getY())) { - applet.setSelected(2); - applet.repaint(); - zoomrq = true; - } else { - applet.setRGeom(0, 0, 0, 0); - applet.setSelected(0); - applet.repaint(); - x1 = y1 = -1; - } - } - - public void mouseReleased(MouseEvent e) - { - if (zoomrq && (e.getButton() == 1)) { - applet.zoomIn(); - zoomrq = false; - } else if (e.getButton() == 3) { - applet.zoomOut(); - zoomrq = false; - } - } - - public void mouseMoved(MouseEvent e) - { - applet.setSelected(applet.isInsideRect(e.getX(), e.getY()) ? 1 : 0); - } - - public void mouseDragged(MouseEvent e) - { - String str; - - if (btn == 1) { - x2 = e.getX(); - y2 = e.getY(); - - applet.setSelected(0); - zoomrq = false; - - if (isInside(x2, y2)) { - str = "[IN ]"; - if (x1 == -1) { - x1 = x2; - y1 = y2; - } else { - applet.setRGeom(x1, y1, x2, y2); - applet.repaint(); - } - } else { - str = "[OUT]"; - } - } - } -} |
