org.openjump.core.rasterimage
Class CurrentLayerIsRasterImageLayerCheck

java.lang.Object
  extended by org.openjump.core.rasterimage.CurrentLayerIsRasterImageLayerCheck
All Implemented Interfaces:
EnableCheck

public class CurrentLayerIsRasterImageLayerCheck
extends java.lang.Object
implements EnableCheck

Enable check (to controll menu items) that checks, if the selected layer is a RasterImage Layer

Version:
$Rev: 2434 $
Author:
Ole Rahn

FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement

Field Summary
protected  EnableCheck checker
           
protected  PlugInContext context
           
 
Constructor Summary
CurrentLayerIsRasterImageLayerCheck(PlugInContext context)
           
 
Method Summary
 java.lang.String check(javax.swing.JComponent component)
          Returns a non-null value if the check failed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected PlugInContext context

checker

protected EnableCheck checker
Constructor Detail

CurrentLayerIsRasterImageLayerCheck

public CurrentLayerIsRasterImageLayerCheck(PlugInContext context)
Method Detail

check

public java.lang.String check(javax.swing.JComponent component)
Description copied from interface: EnableCheck
Returns a non-null value if the check failed. Sometimes the return value is used (for example, it is displayed as a tooltip for menu-items); sometimes it is not (for example, toolbar buttons don't do anything with the return value). An advanced use of an EnableCheck is simply to change some property of a menu item (such as the text), as it is called when menu items are displayed.

Specified by:
check in interface EnableCheck
Returns:
an error message if the check failed, or null if the check passed