net.refractions.udig.tool.info
Class InfoDisplay

java.lang.Object
  extended by net.refractions.udig.tool.info.InfoDisplay

public abstract class InfoDisplay
extends java.lang.Object

An InfoPanel is used to display a specific LayerPointInfo.

This interface is used by the net.refractions.udig.info.infoPanel extention point to teach the InfoTool new tricks. The extention point defines what MIME type this InfoPanel can respond to.

Responsibility is based on MIME type.

I am a bit concerned that we will need to have LayerPointInfo remember the http request. That is; as much as WMS wants to make requests on its own - this is not what we need.

Since:
0.6
Author:
Jody Garnett

Constructor Summary
InfoDisplay()
           
 
Method Summary
abstract  void createDisplay(Composite parent)
          Creates the SWT controls for this InfoDisplay.
 void dispose()
          Clean up any used resources
abstract  Control getControl()
          Access control created by createDisplay.
 boolean isUrlRequired()
          Some displays, like a browser, requre a url to function.
abstract  void setInfo(LayerPointInfo info)
          Called by the InfoView to request display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfoDisplay

public InfoDisplay()
Method Detail

isUrlRequired

public boolean isUrlRequired()
Some displays, like a browser, requre a url to function.

Returns:
true if LayerPointInfo is required to have a request URL

getControl

public abstract Control getControl()
Access control created by createDisplay.

Returns:
Control used to display LayerPointInfo

createDisplay

public abstract void createDisplay(Composite parent)
Creates the SWT controls for this InfoDisplay.

For implementors this is a multi-step process:

  1. Create one or more controls within the parent.

Parameters:
parent - the parent control

setInfo

public abstract void setInfo(LayerPointInfo info)
Called by the InfoView to request display.

This method is called just before getControl().setVisiable().

Parameters:
info - LayerPointInfo to display, or null to disable.

dispose

public void dispose()
Clean up any used resources