com.tensegrity.gui.swt.control.panels.slidepanel
Class SlidePanelContent

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended bycom.tensegrity.gui.swt.control.panels.slidepanel.SlidePanelContent
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class SlidePanelContent
extends org.eclipse.swt.widgets.Composite

The SlidePanelContent class defines the content of a SlidePanel. It behaves like a normal SWT Composite, which means that any layout can be used and any other Control can be added to it.

Right now there is only one restriction to mention: it is not possible to mix SlidePanels with other Controls! That's because of the fact that whenever a SlidePanel is added to this content the layout is changed to SlideContainerLayout which only takes SlidePanels into account.

Typically, within the Tensegrity Graph Framework, SlidePanelContents are used to contain repository items or layout command items.

In order to add a SlidePanel simply use addSlidePanel(). To add any othe Control use this Composite as a parent when creating the new Control. Notice that by default the background is set to be white.

Version:
$Id: SlidePanelContent.java,v 1.2 2005/10/05 13:34:43 ArndHouben Exp $
Author:
ArndHouben

Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
SlidePanelContent(SlidePanel slidePanel, int style)
          Creates a new SlidePanelContent object.
 
Method Summary
 SlidePanel addSlidePanel()
          Adds a new SlidePanel to this content.
 java.util.List getNestedPanels()
          Returns all nested SlidePanels which were added to this content object.
 void resize()
          Triggers a relayout on the enclosing SlidePanel NOTE: this method is necessary since a simple overwriting of layout() will result in a deadlock.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SlidePanelContent

public SlidePanelContent(SlidePanel slidePanel,
                         int style)
Creates a new SlidePanelContent object.

Parameters:
slidePanel - the parent SlidePanel to which this content belongs
style - SWT style bits
Method Detail

addSlidePanel

public final SlidePanel addSlidePanel()
Adds a new SlidePanel to this content. NOTE: this method also checks the currently setted layout and change it to SlideContainerLayout if it was not set before.

Returns:
the newly added SlidePanel

getNestedPanels

public final java.util.List getNestedPanels()
Returns all nested SlidePanels which were added to this content object. NOTE: a SlidePanel could be disposed in the meanwhile and still be in this list. Maybe this behaviour will change in future...

Returns:
a list of SlidePanels

resize

public final void resize()
Triggers a relayout on the enclosing SlidePanel NOTE: this method is necessary since a simple overwriting of layout() will result in a deadlock.



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.