org.formaria.swt
Class Panel

java.lang.Object
  extended by Composite
      extended by org.formaria.swt.Panel
Direct Known Subclasses:
SplitPane

public class Panel
extends Composite

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

Copyright (c) Formaria Ltd., 2008
License: see license.txt


Field Summary
static int BORDER_BEVEL
           
static int BORDER_FLAT
           
static int BORDER_NONE
           
 
Constructor Summary
Panel(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.
 java.lang.String getToolTip()
          Get the tooltip text
 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 setDrawBorder(int value)
          Toggle the border display.
 void setToolTip(java.lang.String text)
          Set the tooltip text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

Panel

public Panel(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


setDrawBorder

public void setDrawBorder(int value)
Toggle the border 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

setToolTip

public void setToolTip(java.lang.String text)
Set the tooltip text

Parameters:
text - the new text

getToolTip

public java.lang.String getToolTip()
Get the tooltip text

Returns:
the existing text if any

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.

Parameters:
x - the left coordinate
y - the top coordinate
w - the width
h - the height