org.openbp.jaspira.gui.plugin
Interface PluginContainer

All Known Implementing Classes:
JaspiraPage, JaspiraPageContainer, ModelerPage, NodeItemEditorPage, PluginDivider, TabbedPluginContainer

public interface PluginContainer

Container used to display a single visible plugin. Interface implemented by all Container for plugins. Has methods to add and remove plugins. Note that according to Composite pattern, a plugin is a plugin container by itself.

Author:
Stephan Moritz

Field Summary
static java.lang.String CENTER
          Constraint: Center segment (adds an object directly to this container)
static java.lang.String EAST
          Constraint: East segment (adds an object to the east of this container)
static java.lang.String NORTH
          Constraint: North segment (adds an object to the north of this container)
static BasicDropRegionId REGION_CENTER
          Center region
static BasicDropRegionId REGION_EAST
          Eastern region
static BasicDropRegionId REGION_NORTH
          Northern region
static BasicDropRegionId REGION_SOUTH
          Southern region
static BasicDropRegionId REGION_WEST
          Western region
static java.lang.String SOUTH
          Constraint: South segment (adds an object to the south of this container)
static java.lang.String WEST
          Constraint: West segment (adds an object to the west of this container)
 
Method Summary
 void addPlugin(VisiblePlugin p)
          Adds a plugin to the container.
 VisiblePlugin getActivePlugin()
          Returns the currently active plugin inside this container.
 JaspiraPage getPage()
          Returns the page level parent plugin of this plugin.
 PluginContainer getParentContainer()
          Returns the parent container of this container.
 java.util.List getPlugins()
          Returns all plugins hosted by this container and its sub containers.
 java.util.List getVisiblePlugins()
          Returns all plugins that are currently visible, i\.e\. shown in their tabbed containers.
 void removePlugin(VisiblePlugin p)
          Removes a plugin from this container.
 void sliceContainer(PluginContainer toInsert, PluginContainer currentContainer, java.lang.String constraint)
          Slices the component at the given edge, i\.e\. replaces the entry with a new PluginDivider consisting of the old component and the new container.
 

Field Detail

CENTER

static final java.lang.String CENTER
Constraint: Center segment (adds an object directly to this container)

See Also:
Constant Field Values

NORTH

static final java.lang.String NORTH
Constraint: North segment (adds an object to the north of this container)

See Also:
Constant Field Values

SOUTH

static final java.lang.String SOUTH
Constraint: South segment (adds an object to the south of this container)

See Also:
Constant Field Values

EAST

static final java.lang.String EAST
Constraint: East segment (adds an object to the east of this container)

See Also:
Constant Field Values

WEST

static final java.lang.String WEST
Constraint: West segment (adds an object to the west of this container)

See Also:
Constant Field Values

REGION_CENTER

static final BasicDropRegionId REGION_CENTER
Center region


REGION_NORTH

static final BasicDropRegionId REGION_NORTH
Northern region


REGION_SOUTH

static final BasicDropRegionId REGION_SOUTH
Southern region


REGION_WEST

static final BasicDropRegionId REGION_WEST
Western region


REGION_EAST

static final BasicDropRegionId REGION_EAST
Eastern region

Method Detail

addPlugin

void addPlugin(VisiblePlugin p)
Adds a plugin to the container.

Parameters:
p - Plugin to add

removePlugin

void removePlugin(VisiblePlugin p)
Removes a plugin from this container.

Parameters:
p - Plugin to remove

getPlugins

java.util.List getPlugins()
Returns all plugins hosted by this container and its sub containers.

Returns:
A list of VisiblePlugin objects or null

getVisiblePlugins

java.util.List getVisiblePlugins()
Returns all plugins that are currently visible, i\.e\. shown in their tabbed containers. This assumes that the container itself is visible.

Returns:
A list of VisiblePlugin objects or null

getActivePlugin

VisiblePlugin getActivePlugin()
Returns the currently active plugin inside this container.

Returns:
The plugin or null if the container does not contain a plugin

getParentContainer

PluginContainer getParentContainer()
Returns the parent container of this container.

Returns:
The parent container or null

getPage

JaspiraPage getPage()
Returns the page level parent plugin of this plugin.

Returns:
The page that holds this plugin or null

sliceContainer

void sliceContainer(PluginContainer toInsert,
                    PluginContainer currentContainer,
                    java.lang.String constraint)
Slices the component at the given edge, i\.e\. replaces the entry with a new PluginDivider consisting of the old component and the new container.

Parameters:
toInsert - Containert to insert
currentContainer - Currrent container that shall be replaced
constraint - The constraint determines where to place the new container:
CENTER/NORTH/SOUTH/EAST/WEST


Copyright © 2011. All Rights Reserved.