Digital Image Processing (using Java)
Digital Image Processing (using Java)
Digital Image Processing (using Java)
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
public <strong>Image</strong>View (Buffered<strong>Image</strong> img){image = img;int width = Math.min (256, image.getWidth());int height = Math.min (256, image.getHeight());viewSize = new Dimension (width, height);setPreferredSize (new Dimension (image.getWidth(), image.getHeight()));}public void paintComponent (Graphics g){}g.draw<strong>Image</strong> (image, 0, 0, this);public void setViewSize (Dimension newSize){}viewSize.setSize (newSize);public Dimension getPreferredScrollableViewportSize(){}return viewSize;public int getScrollableUnitIncrement (Rectangle rect, int orient, int dir){}return 1;public int getScrollableBlockIncrement (Rectangle rect, int orient, int dir){if (orient == SwingConstants.HORIZONTAL)return image.getWidth() / 10;elsereturn image.getHeight() / 10;}public boolean getScrollableTracksViewportWidth(){}return false;}public boolean getScrollableTracksViewportHeight(){}return false;- 13 -