net.xoetrope.swt
Class XPanel

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.XPanel
All Implemented Interfaces:
XAttributedComponent, org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
XSplitPane

public class XPanel
extends org.eclipse.swt.widgets.Composite
implements XAttributedComponent

A basic container for components. The panel can optional draw a border. By default no frame is displayed.

Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt


Field Summary
static int BORDER_BEVEL
           
static int BORDER_FLAT
           
static int BORDER_NONE
           
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
XPanel(java.lang.Object parent)
          Constructs a new panel with a null layout
 
Method Summary
protected  void checkSubclass()
          Suppress the subclassing exception
 int getDrawFrame()
          Get the frame display value.
 int setAttribute(java.lang.String attribName, java.lang.Object attribValue)
          Set one or more attributes of the component.
 void setBounds(int x, int y, int w, int h)
          Set the panel size and location and then force it to redo its layout.
 void setDrawFrame(int value)
          Toggle the frame display.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, 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, getBackgroundImage, 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, setBackgroundImage, 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
 

Field Detail

BORDER_NONE

public static final int BORDER_NONE
See Also:
Constant Field Values

BORDER_BEVEL

public static final int BORDER_BEVEL
See Also:
Constant Field Values

BORDER_FLAT

public static final int BORDER_FLAT
See Also:
Constant Field Values
Constructor Detail

XPanel

public XPanel(java.lang.Object parent)
Constructs a new panel with a null layout

Parameters:
parent - parent object
Method Detail

checkSubclass

protected void checkSubclass()
Suppress the subclassing exception

Overrides:
checkSubclass in class org.eclipse.swt.widgets.Composite

setDrawFrame

public void setDrawFrame(int value)
Toggle the frame display.

Parameters:
value - 0 for no frame, 1 for a bevel, 2 for a flat frame

getDrawFrame

public int getDrawFrame()
Get the frame display value.

Returns:
val 0 for no frame, 1 for a bevel, 2 for a flat frame

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Set the panel size and location and then force it to redo its layout.

Overrides:
setBounds in class org.eclipse.swt.widgets.Control
Parameters:
x - the left coordinate
y - the top coordinate
w - the width
h - the height

setAttribute

public int setAttribute(java.lang.String attribName,
                        java.lang.Object attribValue)
Set one or more attributes of the component.

Specified by:
setAttribute in interface XAttributedComponent
Parameters:
attribName - the name of the attribute
attribValue - the value of the attribute
Returns:
0 for success, non zero for failure or to require some further action