org.esa.beam.framework.ui.application.support
Class AbstractToolView

java.lang.Object
  extended by org.esa.beam.framework.ui.application.support.AbstractControlFactory
      extended by org.esa.beam.framework.ui.application.support.AbstractToolView
All Implemented Interfaces:
com.bc.ceres.binding.PropertyChangeEmitter, ControlFactory, PageComponent, ToolView
Direct Known Subclasses:
AbstractLayerToolView, ColorManipulationToolView, DensityPlotToolView, GeoCodingToolView, HistogramPlotToolView, InformationToolView, MaskToolView, NavigationToolView, PixelInfoToolView, PlacemarkEditorToolView, PlacemarkManagerToolView, ProductsToolView, ProfilePlotToolView, ScatterPlotToolView, SpectrumToolView, StatisticsToolView, TileCacheDiagnosisToolView, WorldMapToolView

public abstract class AbstractToolView
extends AbstractControlFactory
implements ToolView

An abstract base class for client ToolViews.

Clients should use this class a base class for their tool view implementations.


Constructor Summary
protected AbstractToolView()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 void componentClosed()
          The default implementation does nothing.
 void componentFocusGained()
          The default implementation does nothing.
 void componentFocusLost()
          The default implementation does nothing.
 void componentHidden()
          The default implementation does nothing.
 void componentOpened()
          The default implementation does nothing.
 void componentShown()
          The default implementation does nothing.
 void dispose()
          The default implementation does nothing.
 PageComponentContext getContext()
          Gets the actual tool window component as part of the application's main frame window.
 PageComponentDescriptor getDescriptor()
          Gets the descriptor.
 Icon getIcon()
           
 String getId()
          Gets the tool window identifier.
 Container getPaneControl()
          Gets the content pane of this tool window's part.
 Window getPaneWindow()
          Gets the first Window ancestor of this tool window's content pane, or null if it is (currently) not contained inside a Window.
 com.bc.ceres.swing.selection.SelectionContext getSelectionContext()
          Gets the current selection context, if any.
 String getTitle()
           
 boolean isVisible()
          Returns whether the toolview is visible.
protected  void registerLocalCommandExecutors(PageComponentContext context)
          Template method called once when this view is initialized.
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 void setContext(PageComponentContext context)
          Sets the tool window's context.
 void setDescriptor(PageComponentDescriptor descriptor)
          Sets the descriptor.
 void setTitle(String title)
          Sets the actual window title which may be different from what PageComponentDescriptor.getTitle() returns.
 
Methods inherited from class org.esa.beam.framework.ui.application.support.AbstractControlFactory
createControl, createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.esa.beam.framework.ui.application.ControlFactory
getControl
 

Constructor Detail

AbstractToolView

protected AbstractToolView()
Method Detail

getDescriptor

public PageComponentDescriptor getDescriptor()
Description copied from interface: PageComponent
Gets the descriptor.

Specified by:
getDescriptor in interface PageComponent
Returns:
the descriptor
See Also:
PageComponent.setDescriptor(PageComponentDescriptor)

setDescriptor

public final void setDescriptor(PageComponentDescriptor descriptor)
Description copied from interface: PageComponent
Sets the descriptor.

Clients must not call this method directly. It is called only once by the framework after a PageComponentContext has been created and before the framework calls the PageComponent.setContext(org.esa.beam.framework.ui.application.PageComponentContext) method.

Specified by:
setDescriptor in interface PageComponent
Parameters:
descriptor - the descriptor
See Also:
PageComponent.getDescriptor()

getContext

public PageComponentContext getContext()
Gets the actual tool window component as part of the application's main frame window.

Specified by:
getContext in interface PageComponent
Returns:
The tool window part instance as passed into the setContext(PageComponentContext) method or null if the too window has not yet been initialised.

setContext

public final void setContext(PageComponentContext context)
Sets the tool window's context.

Clients may override this method in order configure their tool window. However, after calling this method, getContext() shall return the same context.

Clients must not call this method directly, it is called only once by the framework after a PageComponentContext has been created for this tool window.

Specified by:
setContext in interface PageComponent
Parameters:
context - The tool window part.

getId

public String getId()
Gets the tool window identifier.

Specified by:
getId in interface PageComponent
Returns:
The tool window identifier.

getTitle

public String getTitle()
Specified by:
getTitle in interface PageComponent

getIcon

public Icon getIcon()
Specified by:
getIcon in interface PageComponent

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface com.bc.ceres.binding.PropertyChangeEmitter

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface com.bc.ceres.binding.PropertyChangeEmitter

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface com.bc.ceres.binding.PropertyChangeEmitter

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface com.bc.ceres.binding.PropertyChangeEmitter

registerLocalCommandExecutors

protected void registerLocalCommandExecutors(PageComponentContext context)
Template method called once when this view is initialized. It allows subclasses to register local executors for shared commands with the view context.

Parameters:
context - the view context

dispose

public void dispose()
The default implementation does nothing.

Clients shall not call this method directly.

Specified by:
dispose in interface PageComponent

getPaneControl

public Container getPaneControl()
Gets the content pane of this tool window's part.

Returns:
The content pane of this tool window's part.

getPaneWindow

public Window getPaneWindow()
Gets the first Window ancestor of this tool window's content pane, or null if it is (currently) not contained inside a Window.

Returns:
The first Window ancestor, or null.

setTitle

public void setTitle(String title)
Sets the actual window title which may be different from what PageComponentDescriptor.getTitle() returns.

Parameters:
title - The window's title.

componentOpened

public void componentOpened()
The default implementation does nothing.

Clients shall not call this method directly.

Specified by:
componentOpened in interface PageComponent

componentClosed

public void componentClosed()
The default implementation does nothing.

Clients shall not call this method directly.

Specified by:
componentClosed in interface PageComponent

componentShown

public void componentShown()
The default implementation does nothing.

Clients shall not call this method directly.

Specified by:
componentShown in interface PageComponent

componentHidden

public void componentHidden()
The default implementation does nothing.

Clients shall not call this method directly.

Specified by:
componentHidden in interface PageComponent

componentFocusGained

public void componentFocusGained()
The default implementation does nothing.

Clients shall not call this method directly.

Specified by:
componentFocusGained in interface PageComponent

componentFocusLost

public void componentFocusLost()
The default implementation does nothing.

Clients shall not call this method directly.

Specified by:
componentFocusLost in interface PageComponent

getSelectionContext

public com.bc.ceres.swing.selection.SelectionContext getSelectionContext()
Gets the current selection context, if any.

Specified by:
getSelectionContext in interface PageComponent
Returns:
The current selection context, or null if none exists.
Since:
BEAM 4.7

isVisible

public boolean isVisible()
Returns whether the toolview is visible.

Returns:
if the toolview is visible


Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.