ucar.unidata.idv.control.multi
Class DisplayGroup

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.collab.PropertiedThing
          extended by ucar.unidata.idv.control.multi.DisplayComponent
              extended by ucar.unidata.idv.control.multi.DisplayGroup
All Implemented Interfaces:
PropertyChangeListener, EventListener, Sharable

public class DisplayGroup
extends DisplayComponent

Holds a group of display components

Version:
$Revision: 1.13 $
Author:
IDV Development Team

Field Summary
protected  JComponent container
          The gui
static int LAYOUT_GRID
          type of layout
static int LAYOUT_GRIDBAG
          type of layout
static int LAYOUT_HSPLIT
          type of layout
static int LAYOUT_TABS
          type of layout
static int LAYOUT_VSPLIT
          type of layout
protected  JComponent outerContainer
          outermost gui component
 
Fields inherited from class ucar.unidata.idv.control.multi.DisplayComponent
CMD_SAVEIMAGE, CMD_SAVEMOVIE, displayControl, displayLabel, hasBeenInitialized, isRemoved, PROP_REMOVED
 
Fields inherited from class ucar.unidata.collab.PropertiedThing
propertiesDialog
 
Constructor Summary
DisplayGroup()
          default ctor
DisplayGroup(String name)
          ctor
 
Method Summary
 void addDisplayComponent(DisplayComponent displayComponent)
          Add the wrapper
 void addDisplayComponent(DisplayComponent displayComponent, int index)
          Add the wrapper
 void animationTimeChanged(Real time)
          Set animation time on components
protected  boolean applyProperties()
          Apply properties
 JComponent doMakeContents()
          Create and return the gui contents
 void doRemove()
          do cleanup
 List findDisplayComponents(Class compClass)
          Recursively find all contained components of the given class
 DisplayGroup getAncestorGroup()
          Find the top most ancestor
 List getDisplayComponents()
          Get the DisplayComponents property.
 int getGridColumns()
          Get the GridColumns property.
 boolean getIconified()
          Get the Iconified property.
 Rectangle getLastPosition()
          Get the LastPosition property.
 int getLayout()
          Get the Layout property.
 int getNumColumns()
          Get the NumColumns property.
 int getNumRows()
          Get the NumRows property.
protected  List getPopupMenuItems(List items)
          Make the edit menu items
protected  void getPropertiesComponents(List comps, int tabIdx)
          Show dialog
 String getTypeName()
          What type of thing is this
 int indexOf(DisplayComponent displayComponent)
          What is the index of the child component
 void initAfterUnPersistence(MultiDisplayHolder displayControl, ControlContext vc, Hashtable properties)
          Called by the IntegratedDataViewer to initialize after this control has been unpersisted
 void initDone()
          do final initialization
 void loadData()
          Tell components to load
 void removeDisplayComponent(DisplayComponent displayComponent)
          remove the wrapper
 void setDisplayComponents(List value)
          Set the DisplayComponents property.
 void setDisplayControl(MultiDisplayHolder displayControl)
          Set the display control I'm in.
 void setGridColumns(int value)
          Set the GridColumns property.
 void setIconified(boolean value)
          Set the Iconified property.
 void setLastPosition(Rectangle value)
          Set the LastPosition property.
 void setLayout(int value)
          Set the Layout property.
 void setNumColumns(int value)
          Set the NumColumns property.
 void setNumRows(int value)
          Set the NumRows property.
 void setRowsColumns(int rows, int cols)
          Set layout
 String toString()
          to string
 
Methods inherited from class ucar.unidata.idv.control.multi.DisplayComponent
addGroupMenuItems, doApplyProperties, doMakeDisplayLabel, doSaveImage, doSaveMovie, getBackgroundColor, getContents, getDisplayables, getDisplayControl, getDisplayGroup, getDisplayLabel, getIsRemoved, getLabelShown, getName, removeDisplayComponent, setBackgroundColor, setDisplayGroup, setIsRemoved, setLabelShown, setName, showPopup, showProperties
 
Methods inherited from class ucar.unidata.collab.PropertiedThing
addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyListeners, getPropertyTabs, isShowing, propertyChange, removePropertyChangeListener, showProperties
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Field Detail

LAYOUT_GRIDBAG

public static final int LAYOUT_GRIDBAG
type of layout

See Also:
Constant Field Values

LAYOUT_GRID

public static final int LAYOUT_GRID
type of layout

See Also:
Constant Field Values

LAYOUT_TABS

public static final int LAYOUT_TABS
type of layout

See Also:
Constant Field Values

LAYOUT_HSPLIT

public static final int LAYOUT_HSPLIT
type of layout

See Also:
Constant Field Values

LAYOUT_VSPLIT

public static final int LAYOUT_VSPLIT
type of layout

See Also:
Constant Field Values

container

protected JComponent container
The gui


outerContainer

protected JComponent outerContainer
outermost gui component

Constructor Detail

DisplayGroup

public DisplayGroup()
default ctor


DisplayGroup

public DisplayGroup(String name)
ctor

Parameters:
name - name
Method Detail

getTypeName

public String getTypeName()
What type of thing is this

Overrides:
getTypeName in class DisplayComponent
Returns:
type name

initDone

public void initDone()
do final initialization

Overrides:
initDone in class DisplayComponent

initAfterUnPersistence

public void initAfterUnPersistence(MultiDisplayHolder displayControl,
                                   ControlContext vc,
                                   Hashtable properties)
Called by the IntegratedDataViewer to initialize after this control has been unpersisted

Overrides:
initAfterUnPersistence in class DisplayComponent
Parameters:
displayControl - The control I am part of
vc - The context in which this control exists
properties - Properties that may hold things

doMakeContents

public JComponent doMakeContents()
Create and return the gui contents

Specified by:
doMakeContents in class DisplayComponent
Returns:
gui contents

getAncestorGroup

public DisplayGroup getAncestorGroup()
Find the top most ancestor

Returns:
The top most ancestor

findDisplayComponents

public List findDisplayComponents(Class compClass)
Recursively find all contained components of the given class

Parameters:
compClass - The class to look for
Returns:
List of components

addDisplayComponent

public void addDisplayComponent(DisplayComponent displayComponent)
Add the wrapper

Parameters:
displayComponent - new one

indexOf

public int indexOf(DisplayComponent displayComponent)
What is the index of the child component

Parameters:
displayComponent - child component
Returns:
its index

addDisplayComponent

public void addDisplayComponent(DisplayComponent displayComponent,
                                int index)
Add the wrapper

Parameters:
displayComponent - new one
index - Where

setDisplayControl

public void setDisplayControl(MultiDisplayHolder displayControl)
Set the display control I'm in. Also set the DC on all of my children components.

Overrides:
setDisplayControl in class DisplayComponent
Parameters:
displayControl - The display control

applyProperties

protected boolean applyProperties()
Apply properties

Overrides:
applyProperties in class DisplayComponent
Returns:
Was successful

getPropertiesComponents

protected void getPropertiesComponents(List comps,
                                       int tabIdx)
Show dialog

Overrides:
getPropertiesComponents in class DisplayComponent
Parameters:
comps - List of components
tabIdx - which tab

animationTimeChanged

public void animationTimeChanged(Real time)
Set animation time on components

Overrides:
animationTimeChanged in class DisplayComponent
Parameters:
time - time

removeDisplayComponent

public void removeDisplayComponent(DisplayComponent displayComponent)
remove the wrapper

Parameters:
displayComponent - the wrapper to remove

doRemove

public void doRemove()
do cleanup

Overrides:
doRemove in class DisplayComponent

loadData

public void loadData()
              throws RemoteException,
                     VisADException
Tell components to load

Overrides:
loadData in class DisplayComponent
Throws:
RemoteException - On badness
VisADException - On badness

getPopupMenuItems

protected List getPopupMenuItems(List items)
Make the edit menu items

Overrides:
getPopupMenuItems in class DisplayComponent
Parameters:
items - Holds the menu items
Returns:
The list of items

setDisplayComponents

public void setDisplayComponents(List value)
Set the DisplayComponents property.

Parameters:
value - The new value for DisplayComponents

getDisplayComponents

public List getDisplayComponents()
Get the DisplayComponents property.

Returns:
The DisplayComponents

setRowsColumns

public void setRowsColumns(int rows,
                           int cols)
Set layout

Parameters:
rows - rows
cols - cols

setNumRows

public void setNumRows(int value)
Set the NumRows property.

Parameters:
value - The new value for NumRows

getNumRows

public int getNumRows()
Get the NumRows property.

Returns:
The NumRows

setNumColumns

public void setNumColumns(int value)
Set the NumColumns property.

Parameters:
value - The new value for NumColumns

getNumColumns

public int getNumColumns()
Get the NumColumns property.

Returns:
The NumColumns

toString

public String toString()
to string

Overrides:
toString in class DisplayComponent
Returns:
string

setLastPosition

public void setLastPosition(Rectangle value)
Set the LastPosition property.

Parameters:
value - The new value for LastPosition

getLastPosition

public Rectangle getLastPosition()
Get the LastPosition property.

Returns:
The LastPosition

setIconified

public void setIconified(boolean value)
Set the Iconified property.

Parameters:
value - The new value for Iconified

getIconified

public boolean getIconified()
Get the Iconified property.

Returns:
The Iconified

setLayout

public void setLayout(int value)
Set the Layout property.

Parameters:
value - The new value for Layout

getLayout

public int getLayout()
Get the Layout property.

Returns:
The Layout

setGridColumns

public void setGridColumns(int value)
Set the GridColumns property.

Parameters:
value - The new value for GridColumns

getGridColumns

public int getGridColumns()
Get the GridColumns property.

Returns:
The GridColumns