org.esa.beam.framework.ui.application
Interface ToolViewDescriptor

All Superinterfaces:
PageComponentDescriptor, com.bc.ceres.binding.PropertyChangeEmitter
All Known Implementing Classes:
DefaultToolViewDescriptor

public interface ToolViewDescriptor
extends PageComponentDescriptor

Metadata about a view; a view descriptor is effectively a singleton view definition. A descriptor also acts as a factory which produces new instances of a given view when requested, typically by a requesting application page. A view descriptor can also produce a command which launches a view for display on the page within the current active window.

Author:
Marco Peters (original by Keith Donald of Spring RCP project)

Nested Class Summary
static class ToolViewDescriptor.DockSide
          Represents all possible tool window docking sides.
static class ToolViewDescriptor.State
          Represents all possible tool window states.
 
Field Summary
static String PROPERTY_KEY_ACCELERATOR
           
static String PROPERTY_KEY_INIT_INDEX
           
static String PROPERTY_KEY_INIT_SIDE
           
static String PROPERTY_KEY_INIT_STATE
           
static String PROPERTY_KEY_MNEMONIC
           
static String PROPERTY_KEY_TOOL_BAR_ID
           
 
Fields inherited from interface org.esa.beam.framework.ui.application.PageComponentDescriptor
PROPERTY_KEY_DESCRIPTION, PROPERTY_KEY_HELP_ID, PROPERTY_KEY_LARGE_ICON, PROPERTY_KEY_MAXIMIZABLE, PROPERTY_KEY_SMALL_ICON, PROPERTY_KEY_TAB_TITLE, PROPERTY_KEY_TITLE
 
Method Summary
 Command createShowViewCommand(ApplicationPage applicationPage)
          Create a command that when executed, will attempt to show the page component described by this descriptor in the provided application window.
 KeyStroke getAccelerator()
           
 int getDockedHeight()
           
 int getDockedWidth()
           
 Rectangle getFloatingBounds()
           
 int getInitIndex()
           
 ToolViewDescriptor.DockSide getInitSide()
           
 ToolViewDescriptor.State getInitState()
           
 char getMnemonic()
           
 String getToolBarId()
          Gets the ID of the tool bar in which the associated "show view" command will be placed.
 boolean isAutohidable()
           
 boolean isDockable()
           
 boolean isFloatable()
           
 boolean isHidable()
           
 void setAccelerator(KeyStroke accelerator)
           
 void setAutohidable(boolean state)
           
 void setDockable(boolean state)
           
 void setDockedHeight(int dockedHeight)
           
 void setDockedWidth(int dockedWidth)
           
 void setFloatable(boolean state)
           
 void setFloatingBounds(Rectangle floatingBounds)
           
 void setHidable(boolean state)
           
 void setInitIndex(int initIndex)
           
 void setInitSide(ToolViewDescriptor.DockSide initSide)
           
 void setInitState(ToolViewDescriptor.State initState)
           
 void setMnemonic(char mnemonic)
           
 void setToolBarId(String id)
           
 
Methods inherited from interface org.esa.beam.framework.ui.application.PageComponentDescriptor
createPageComponent, getDescription, getHelpId, getId, getLargeIcon, getPreferredSize, getSmallIcon, getTabTitle, getTitle, isEnabled, isMaximizable, isVisible, setDescription, setEnabled, setHelpId, setLargeIcon, setMaximizable, setPreferredSize, setSmallIcon, setTabTitle, setTitle, setVisible
 
Methods inherited from interface com.bc.ceres.binding.PropertyChangeEmitter
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROPERTY_KEY_MNEMONIC

static final String PROPERTY_KEY_MNEMONIC
See Also:
Constant Field Values

PROPERTY_KEY_ACCELERATOR

static final String PROPERTY_KEY_ACCELERATOR
See Also:
Constant Field Values

PROPERTY_KEY_INIT_STATE

static final String PROPERTY_KEY_INIT_STATE
See Also:
Constant Field Values

PROPERTY_KEY_INIT_SIDE

static final String PROPERTY_KEY_INIT_SIDE
See Also:
Constant Field Values

PROPERTY_KEY_INIT_INDEX

static final String PROPERTY_KEY_INIT_INDEX
See Also:
Constant Field Values

PROPERTY_KEY_TOOL_BAR_ID

static final String PROPERTY_KEY_TOOL_BAR_ID
See Also:
Constant Field Values
Method Detail

getMnemonic

char getMnemonic()
Returns:
The mnemonic.

setMnemonic

void setMnemonic(char mnemonic)
Parameters:
mnemonic - The mnemonic.

getAccelerator

KeyStroke getAccelerator()
Returns:
The accelerator.

setAccelerator

void setAccelerator(KeyStroke accelerator)
Parameters:
accelerator - The accelerator.

getInitState

ToolViewDescriptor.State getInitState()
Returns:
The initial state.

setInitState

void setInitState(ToolViewDescriptor.State initState)
Parameters:
initState - The initial state.

getInitSide

ToolViewDescriptor.DockSide getInitSide()
Returns:
The initial side.

setInitSide

void setInitSide(ToolViewDescriptor.DockSide initSide)
Parameters:
initSide - The initial side.

getInitIndex

int getInitIndex()
Returns:
The initial index.

setInitIndex

void setInitIndex(int initIndex)
Parameters:
initIndex - The initial index.

getDockedWidth

int getDockedWidth()
Returns:
The docked width in pixels.

setDockedWidth

void setDockedWidth(int dockedWidth)
Parameters:
dockedWidth - The docked width in pixels.

getDockedHeight

int getDockedHeight()
Returns:
The docked height in pixels.

setDockedHeight

void setDockedHeight(int dockedHeight)
Parameters:
dockedHeight - The docked height in pixels.

getFloatingBounds

Rectangle getFloatingBounds()
Returns:
The bounds of the tool window when in floating mode.

setFloatingBounds

void setFloatingBounds(Rectangle floatingBounds)
Parameters:
floatingBounds - The bounds of the tool window when in floating mode.

isHidable

boolean isHidable()
Returns:
true if the window is hidable, false otherwise.

setHidable

void setHidable(boolean state)
Parameters:
state - true if the window is hidable, false otherwise.

isDockable

boolean isDockable()
Returns:
true if the window is dockable, false otherwise.

setDockable

void setDockable(boolean state)
Parameters:
state - true if the window is dockable, false otherwise.

isFloatable

boolean isFloatable()
Returns:
true if the window is floatable, false otherwise.

setFloatable

void setFloatable(boolean state)
Parameters:
state - true if the window is floatable, false otherwise.

isAutohidable

boolean isAutohidable()
Returns:
true if the window is auto-hidable, false otherwise.

setAutohidable

void setAutohidable(boolean state)
Parameters:
state - true if the window is auto-hidable, false otherwise.

getToolBarId

String getToolBarId()
Gets the ID of the tool bar in which the associated "show view" command will be placed. If the ID is null, the associated "show view" command will be placed in the default tool bar (ID="viewsToolBar").

Returns:
The ID of the tool bar.
See Also:
createShowViewCommand(ApplicationPage)

setToolBarId

void setToolBarId(String id)
Parameters:
id - The ID of the tool bar.
See Also:
getToolBarId()

createShowViewCommand

Command createShowViewCommand(ApplicationPage applicationPage)
Create a command that when executed, will attempt to show the page component described by this descriptor in the provided application window.

Parameters:
applicationPage - The application page.
Returns:
The show page component command.
See Also:
getToolBarId()


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