org.openjump.core.ui.plugin.view.helpclassescale
Class ShowScaleRenderer

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.renderer.SimpleRenderer
      extended by org.openjump.core.ui.plugin.view.helpclassescale.ShowScaleRenderer
All Implemented Interfaces:
Renderer

public class ShowScaleRenderer
extends SimpleRenderer

Calculates the actual scale and draws the text and a white rectangle around

Author:
sstein

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vividsolutions.jump.workbench.ui.renderer.Renderer
Renderer.ContentDependendFactory, Renderer.Factory
 
Field Summary
static java.lang.String CONTENT_ID
           
 
Fields inherited from class com.vividsolutions.jump.workbench.ui.renderer.SimpleRenderer
cancelled, panel
 
Constructor Summary
ShowScaleRenderer(LayerViewPanel panel)
           
 
Method Summary
static boolean isEnabled(LayerViewPanel panel)
           
protected  void paint(java.awt.Graphics2D g)
           
static void setEnabled(boolean enabled, LayerViewPanel panel)
           
 void setMyPlugInContext(PlugInContext myPlugInContext)
           
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.renderer.SimpleRenderer
cancel, clearImageCache, copyTo, createRunnable, getContentID, isRendering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_ID

public static final java.lang.String CONTENT_ID
See Also:
Constant Field Values
Constructor Detail

ShowScaleRenderer

public ShowScaleRenderer(LayerViewPanel panel)
Method Detail

paint

protected void paint(java.awt.Graphics2D g)
Specified by:
paint in class SimpleRenderer

isEnabled

public static boolean isEnabled(LayerViewPanel panel)
Parameters:
panel -
Returns:
true if the scale is enabled in the LayerViewPanel

setEnabled

public static void setEnabled(boolean enabled,
                              LayerViewPanel panel)

setMyPlugInContext

public void setMyPlugInContext(PlugInContext myPlugInContext)
Parameters:
myPlugInContext - The myPlugInContext to set.