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 org.eclipse.swt.widgets.Group
                      extended by net.xoetrope.swt.XPanel
All Implemented Interfaces:
XAttributedComponent, org.eclipse.swt.graphics.Drawable

public class XPanel
extends org.eclipse.swt.widgets.Group
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)
           
 
Method Summary
protected  void checkSubclass()
           
 int getDrawFrame()
          Get the frame display value.
 void 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.Group
computeTrim, getClientArea, getText, setText
 
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
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, 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)
Method Detail

checkSubclass

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

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 void setAttribute(java.lang.String attribName,
                         java.lang.Object attribValue)
Set one or more attributes of the component.
  1. border, value=(0|1)

Specified by:
setAttribute in interface XAttributedComponent
Parameters:
attribName - the attribute name
attribValue - the attribute value