Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.swt.apps
Class ImageViewer  view ImageViewer download ImageViewer.java

java.lang.Object
  extended bycom.port80.swt.apps.ImageViewer

public class ImageViewer
extends java.lang.Object

An image viewer using swt.

  • A GC can be created on an Image and then use it to draw into the Image.
  • To display very large image, pixel data is loaded into ImageData and then tiles of the data are used to create Image's for display.
  • The current development version, for now, this is same as ImageViewer1.

  • Nested Class Summary
    (package private)  class ImageViewer.TextPrompter
               
     
    Field Summary
    private  org.eclipse.swt.graphics.Color fBlackColor
               
    private  org.eclipse.swt.graphics.Cursor fCrossCursor
               
    private  org.eclipse.swt.widgets.Label fDataLabel
               
    private  org.eclipse.swt.custom.StyledText fDataText
               
    private  org.eclipse.swt.widgets.Display fDisplay
               
    private  java.lang.String fFilename
               
    private  org.eclipse.swt.graphics.Font fFont
               
    private  org.eclipse.swt.graphics.Image fImage
               
    private  org.eclipse.swt.widgets.Canvas fImageCanvas
               
    private  org.eclipse.swt.graphics.GC fImageCanvasGC
               
    private  org.eclipse.swt.graphics.ImageData fImageData
               
    private  int fImageDataIndex
               
    private  org.eclipse.swt.graphics.ImageData[] fImageDatas
               
    private  boolean fIncremental
               
    private  org.eclipse.swt.widgets.Label fInfoLabel
               
    private  java.lang.String fLastPath
               
    private  org.eclipse.swt.graphics.Color fLightColor
               
    private  long fLoadTime
               
    private  org.eclipse.swt.widgets.Sash fSash
               
    private  double fScale
               
    private  org.eclipse.swt.widgets.Combo fScaleCombo
               
    private  org.eclipse.swt.widgets.Shell fShell
               
    private  boolean fShowMask
               
    private  org.eclipse.swt.widgets.Label fStatusLabel
               
    private  boolean fTransparent
               
    private  org.eclipse.swt.graphics.Color fWhiteColor
               
    private  int fX
               
    private  int fY
               
    private static java.lang.String[] IMAGE_FILTER_NAMES
               
    private static java.lang.String[] IMAGE_SUFFICES
               
    private  boolean isResizing
               
    private static java.lang.String NAME
               
     
    Constructor Summary
    ImageViewer()
               
     
    Method Summary
    (package private)  void clear()
               
    (package private)  void createFileMenu(org.eclipse.swt.widgets.Menu menuBar)
               
    (package private)  org.eclipse.swt.widgets.Menu createMenuBar()
               
    (package private) static java.lang.String createMsg(java.lang.String msg, java.lang.Object arg)
               
    (package private)  void createWidgets()
               
    (package private)  void displayImage(org.eclipse.swt.graphics.ImageData newImageData)
               
    (package private)  void dispose()
               
    (package private)  void disposeImageCanvasGC()
               
    (package private) static java.lang.String fileTypeString(int filetype)
               
    (package private)  org.eclipse.swt.widgets.Display getDisplay()
               
    (package private)  org.eclipse.swt.widgets.Shell getShell()
               
    (package private) static java.lang.String i18n(java.lang.String str)
               
    static void main(java.lang.String[] args)
               
     org.eclipse.swt.widgets.Shell open(org.eclipse.swt.widgets.Display display)
               
    (package private)  void openFile()
               
    (package private)  void openURL()
               
    (package private)  void paintImage(org.eclipse.swt.events.PaintEvent event)
               
    (package private)  void resetScaleCombo()
               
    (package private)  void resetScrollBars()
               
    (package private)  void resizeScrollBars()
               
    (package private)  void resizeShell(org.eclipse.swt.events.ControlEvent event)
               
    (package private)  void scaleImage()
               
    (package private)  void scrollHorizontally(org.eclipse.swt.widgets.ScrollBar scrollBar)
               
    (package private)  void scrollVertically(org.eclipse.swt.widgets.ScrollBar scrollBar)
               
    (package private)  void showColorAt(int mx, int my)
               
    (package private)  void showColorForData()
               
    (package private)  void showColorForPixel(int x, int y)
               
    (package private)  void showErrorDialog(java.lang.String operation, java.lang.String filename, java.lang.Exception e)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    NAME

    private static final java.lang.String NAME
    See Also:
    Constant Field Values

    IMAGE_SUFFICES

    private static final java.lang.String[] IMAGE_SUFFICES

    IMAGE_FILTER_NAMES

    private static final java.lang.String[] IMAGE_FILTER_NAMES

    fDisplay

    private org.eclipse.swt.widgets.Display fDisplay

    fShell

    private org.eclipse.swt.widgets.Shell fShell

    fFont

    private org.eclipse.swt.graphics.Font fFont

    fWhiteColor

    private org.eclipse.swt.graphics.Color fWhiteColor

    fBlackColor

    private org.eclipse.swt.graphics.Color fBlackColor

    fLightColor

    private org.eclipse.swt.graphics.Color fLightColor

    fCrossCursor

    private org.eclipse.swt.graphics.Cursor fCrossCursor

    fImageCanvasGC

    private org.eclipse.swt.graphics.GC fImageCanvasGC

    fImage

    private org.eclipse.swt.graphics.Image fImage

    fImageDatas

    private org.eclipse.swt.graphics.ImageData[] fImageDatas

    fImageData

    private org.eclipse.swt.graphics.ImageData fImageData

    fImageDataIndex

    private int fImageDataIndex

    fScale

    private double fScale

    fX

    private int fX

    fY

    private int fY

    fLastPath

    private java.lang.String fLastPath

    fTransparent

    private boolean fTransparent

    fShowMask

    private boolean fShowMask

    fIncremental

    private boolean fIncremental

    fLoadTime

    private long fLoadTime

    fFilename

    private java.lang.String fFilename

    fScaleCombo

    private org.eclipse.swt.widgets.Combo fScaleCombo

    fImageCanvas

    private org.eclipse.swt.widgets.Canvas fImageCanvas

    fSash

    private org.eclipse.swt.widgets.Sash fSash

    fDataLabel

    private org.eclipse.swt.widgets.Label fDataLabel

    fStatusLabel

    private org.eclipse.swt.widgets.Label fStatusLabel

    fDataText

    private org.eclipse.swt.custom.StyledText fDataText

    fInfoLabel

    private org.eclipse.swt.widgets.Label fInfoLabel

    isResizing

    private boolean isResizing
    Constructor Detail

    ImageViewer

    public ImageViewer()
    Method Detail

    main

    public static void main(java.lang.String[] args)

    open

    public org.eclipse.swt.widgets.Shell open(org.eclipse.swt.widgets.Display display)

    dispose

    void dispose()

    disposeImageCanvasGC

    void disposeImageCanvasGC()

    getShell

    org.eclipse.swt.widgets.Shell getShell()

    getDisplay

    org.eclipse.swt.widgets.Display getDisplay()

    createWidgets

    void createWidgets()

    createMenuBar

    org.eclipse.swt.widgets.Menu createMenuBar()

    createFileMenu

    void createFileMenu(org.eclipse.swt.widgets.Menu menuBar)

    openFile

    void openFile()

    openURL

    void openURL()

    displayImage

    void displayImage(org.eclipse.swt.graphics.ImageData newImageData)

    paintImage

    void paintImage(org.eclipse.swt.events.PaintEvent event)

    showColorAt

    void showColorAt(int mx,
                     int my)

    showColorForPixel

    void showColorForPixel(int x,
                           int y)

    showColorForData

    void showColorForData()

    scrollHorizontally

    void scrollHorizontally(org.eclipse.swt.widgets.ScrollBar scrollBar)

    scrollVertically

    void scrollVertically(org.eclipse.swt.widgets.ScrollBar scrollBar)

    scaleImage

    void scaleImage()

    resetScaleCombo

    void resetScaleCombo()

    resetScrollBars

    void resetScrollBars()

    resizeScrollBars

    void resizeScrollBars()

    resizeShell

    void resizeShell(org.eclipse.swt.events.ControlEvent event)

    clear

    void clear()

    showErrorDialog

    void showErrorDialog(java.lang.String operation,
                         java.lang.String filename,
                         java.lang.Exception e)

    fileTypeString

    static java.lang.String fileTypeString(int filetype)

    createMsg

    static java.lang.String createMsg(java.lang.String msg,
                                      java.lang.Object arg)

    i18n

    static java.lang.String i18n(java.lang.String str)