gui

Class ImageViewer


public class ImageViewer
extends JTabbedPane

Überschrift:

Beschreibung:

Field Summary

static int
DIFF_IMAGE_TAB
static int
IMAGES_TAB
static int
STATISTICS_TAB
private Gui
gui
private ImageHolder
images
private MainImageTab
tab1
private DiffImageTab
tab2
private StatisticsTab
tab3

Constructor Summary

ImageViewer(Gui g, ImageHolder ih)

Method Summary

void
clearMainImage()
This method removes all graphical objects from the images in the main-image-tab
void
disableAllModes()
Disables the block-selecttion-mode and the range- selection-mode
void
disableDiffTab()
disables ths tab whith the zoomed images of the search aera and the search blocks
void
disableStatisticsTab()
disables the statistic tab and clears all the data in it
void
enableDiffTab(int searchRange)
This method enables the tab which displays zoomed images of the search aera and of the image blocks which are compared.
void
enableStatisticsTab()
This method enables the tab which provides some interesting statistic data about the search so far
DiffImageTab
getDiffImageTab()
Returns the DiffImage tab which displays the search area and the search blocks
ImageHolder
getImageHolder()
Returns the ImageHolder-object which provides the two images and the search blocks
MainImageTab
getMainImageTab()
int
getSearchRange()
Returns the search range, selected by the user
StatisticsTab
getStatisticTab()
void
resetPanel()
Resets all three tabs and swiches to the main image tab
void
setBlockSelectionMode(boolean status)
This method enables or disables the block selection mode.
void
setImage(int imageIndex)
set's the image in the main imnage tab to the one specified by the parameter
void
setSearchRangeMode(boolean status)
This method enebales or disables the mode for selecting the search range.
boolean
setSelectedTab(int tabIndex)
void
updateStatisticsTab()
This method forces the statitic tab to update it's data

Field Details

DIFF_IMAGE_TAB

public static final int DIFF_IMAGE_TAB
Field Value:
1

IMAGES_TAB

public static final int IMAGES_TAB
Field Value:
0

STATISTICS_TAB

public static final int STATISTICS_TAB
Field Value:
2

gui

private Gui gui

images

private ImageHolder images

tab1

private MainImageTab tab1

tab2

private DiffImageTab tab2

tab3

private StatisticsTab tab3

Constructor Details

ImageViewer

public ImageViewer(Gui g,
                   ImageHolder ih)

Method Details

clearMainImage

public void clearMainImage()
This method removes all graphical objects from the images in the main-image-tab

disableAllModes

public void disableAllModes()
Disables the block-selecttion-mode and the range- selection-mode

disableDiffTab

public void disableDiffTab()
disables ths tab whith the zoomed images of the search aera and the search blocks

disableStatisticsTab

public void disableStatisticsTab()
disables the statistic tab and clears all the data in it

enableDiffTab

public void enableDiffTab(int searchRange)
This method enables the tab which displays zoomed images of the search aera and of the image blocks which are compared.
Parameters:

enableStatisticsTab

public void enableStatisticsTab()
This method enables the tab which provides some interesting statistic data about the search so far

getDiffImageTab

public DiffImageTab getDiffImageTab()
Returns the DiffImage tab which displays the search area and the search blocks
Returns:
DiffImageTab the DiffImageTab object

getImageHolder

public ImageHolder getImageHolder()
Returns the ImageHolder-object which provides the two images and the search blocks
Returns:
ImageHolder The ImageHolder object

getMainImageTab

public MainImageTab getMainImageTab()

getSearchRange

public int getSearchRange()
Returns the search range, selected by the user
Returns:
int the search range

getStatisticTab

public StatisticsTab getStatisticTab()

resetPanel

public void resetPanel()
Resets all three tabs and swiches to the main image tab

setBlockSelectionMode

public void setBlockSelectionMode(boolean status)
This method enables or disables the block selection mode. While enables, the user is able to select a search block in the main image tab(image01) by clicking with the mouse on the desired position.
Parameters:

setImage

public void setImage(int imageIndex)
set's the image in the main imnage tab to the one specified by the parameter
Parameters:

setSearchRangeMode

public void setSearchRangeMode(boolean status)
This method enebales or disables the mode for selecting the search range. While enabled, the user is able to draw a rectangle around the selected search block in the main image tab (image02). The rectangle marks the search aera.
Parameters:

setSelectedTab

public boolean setSelectedTab(int tabIndex)

updateStatisticsTab

public void updateStatisticsTab()
This method forces the statitic tab to update it's data