net.refractions.udig.project.ui.controls
Class ScaleRatioLabel

java.lang.Object
  extended by ContributionItem
      extended by net.refractions.udig.project.ui.controls.ScaleRatioLabel

public class ScaleRatioLabel
extends ContributionItem

Displays the current scale ratio on the status bar.

Author:
Andrea Aime

Field Summary
static java.lang.String SCALE_ITEM_ID
           
static int STATUS_LINE_HEIGHT
           
 
Constructor Summary
ScaleRatioLabel(MapEditorPart editor)
           
 
Method Summary
 void dispose()
           
 void fill(Composite c)
           
 void focusGained(FocusEvent e)
           
 void focusLost(FocusEvent e)
           
 boolean isDynamic()
           
 boolean isLegalKey(KeyEvent e)
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void setViewportModel(IViewportModel newViewportModel)
          Sets the current viewport model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_LINE_HEIGHT

public static final int STATUS_LINE_HEIGHT

SCALE_ITEM_ID

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

ScaleRatioLabel

public ScaleRatioLabel(MapEditorPart editor)
Method Detail

setViewportModel

public void setViewportModel(IViewportModel newViewportModel)
Sets the current viewport model. Should be called every time the map changes in order update the shared ratio label


isDynamic

public boolean isDynamic()
See Also:
org.eclipse.jface.action.IContributionItem#isDynamic()

dispose

public void dispose()
See Also:
org.eclipse.jface.action.ContributionItem#dispose()

fill

public void fill(Composite c)
See Also:
org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.Composite)

keyPressed

public void keyPressed(KeyEvent e)

isLegalKey

public boolean isLegalKey(KeyEvent e)

keyReleased

public void keyReleased(KeyEvent e)

focusGained

public void focusGained(FocusEvent e)

focusLost

public void focusLost(FocusEvent e)