net.xoetrope.swt
Class XSwtTarget

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by net.xoetrope.swt.XSwtTarget
All Implemented Interfaces:
XContentHolder, org.eclipse.swt.graphics.Drawable

public class XSwtTarget
extends org.eclipse.swt.widgets.Composite
implements XContentHolder

When using framesets the 'screen' is devided up into a number of different target areas. Each target area may contain a page. The content for each target area is set by naming the target area when calling displayPage. This class provides support for this behaviour by wrapping the Container class to ensure the target area is properly sized. How the target areas are actually laid out depends on the layout manager being used.

Copyright: Copyright (c) Xoetrope Ltd., 2002-2003

$Revision: 1.5 $


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
XSwtTarget(org.eclipse.swt.widgets.Composite parent)
          Setup a new target area and set its size
 
Method Summary
protected  void checkSubclass()
           
 java.lang.String getContent()
          Get the content of this target
 boolean getHasListeners()
          Get the hasListeners flag
 void setContent(java.lang.String pageName)
          Set the content of this target
 void setHasListeners(boolean value)
          Set the hasListeners flag
 void setup(java.lang.String name, int width, int height, java.util.Hashtable params)
          Sets up the new target
 
Methods inherited from class org.eclipse.swt.widgets.Composite
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

XSwtTarget

public XSwtTarget(org.eclipse.swt.widgets.Composite parent)
Setup a new target area and set its size

Method Detail

checkSubclass

protected void checkSubclass()
Overrides:
checkSubclass in class org.eclipse.swt.widgets.Composite

setup

public void setup(java.lang.String name,
                  int width,
                  int height,
                  java.util.Hashtable params)
Sets up the new target

Parameters:
params - extra parameters for the target

getHasListeners

public boolean getHasListeners()
Get the hasListeners flag

Returns:
the value

setHasListeners

public void setHasListeners(boolean value)
Set the hasListeners flag

Parameters:
value - the new value

getContent

public java.lang.String getContent()
Get the content of this target

Returns:
the content or page name

setContent

public void setContent(java.lang.String pageName)
Set the content of this target

Specified by:
setContent in interface XContentHolder
Parameters:
pageName - the content page name