git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make private
[fanfix.git]
/
examples
/
JexerImageViewer.java
diff --git
a/examples/JexerImageViewer.java
b/examples/JexerImageViewer.java
index b8424a5eb178d8b2d991a34d64af3835e40355b6..437aa8e712153f5a8dd56515094ac685cfb0456c 100644
(file)
--- a/
examples/JexerImageViewer.java
+++ b/
examples/JexerImageViewer.java
@@
-31,9
+31,6
@@
public class JexerImageViewer extends TApplication {
* Main entry point.
*/
public static void main(String [] args) throws Exception {
* Main entry point.
*/
public static void main(String [] args) throws Exception {
- // For this application, we must use ptypipe so that the tile shells
- // can be aware of their size.
-
JexerImageViewer app = new JexerImageViewer();
(new Thread(app)).start();
}
JexerImageViewer app = new JexerImageViewer();
(new Thread(app)).start();
}
@@
-310,12
+307,8
@@
class ImageViewerDesktop extends TDesktop {
imageWidget = new TImage(this, getWidth() - width,
getHeight() - height, width, height, image, 0, 0, null);
imageWidget = new TImage(this, getWidth() - width,
getHeight() - height, width, height, image, 0, 0, null);
- // Resize the image down until it can fit within the pane.
- while ((imageWidget.getRows() > height)
- || (imageWidget.getColumns() > width)
- ) {
- imageWidget.onKeypress(new TKeypressEvent(kbAltDown));
- }
+ // Resize the image to fit within the pane.
+ imageWidget.setScaleType(TImage.Scale.SCALE);
imageWidget.setActive(false);
activate(directoryList);
imageWidget.setActive(false);
activate(directoryList);