lime.uga.edu.wsworkflow.layoutTester
Class Tab

java.lang.Object
  extended by lime.uga.edu.wsworkflow.layoutTester.Tab
Direct Known Subclasses:
FillLayoutTab, FormLayoutTab, GridLayoutTab, RowLayoutTab

abstract class Tab
extends java.lang.Object

Tab is the abstract superclass of every page in the example's tab folder. Each page in the tab folder displays a layout, and allows the user to manipulate the layout. A typical page in a Tab contains a two column composite. The left column contains the layout group, which contains the "layout composite" (the one that has the example layout). The right column contains the "control" group. The "control" group allows the user to interact with the example. Typical operations are modifying layout parameters, adding children to the "layout composite", and modifying child layout data. The "Code" button in the "control" group opens a new window containing code that will regenerate the layout. This code (or parts of it) can be selected and copied to the clipboard.


Field Summary
(package private)  org.eclipse.swt.widgets.Button add
           
(package private)  org.eclipse.swt.widgets.Group childGroup
           
(package private)  org.eclipse.swt.widgets.Control[] children
           
(package private)  org.eclipse.swt.widgets.Button clear
           
(package private)  org.eclipse.swt.widgets.Button code
           
(package private)  org.eclipse.swt.widgets.Group controlGroup
           
(package private)  java.util.Vector data
           
(package private)  org.eclipse.swt.widgets.Button delete
           
(package private)  int index
           
(package private)  LayoutExample instance
           
(package private)  org.eclipse.swt.widgets.TableItem lastSelected
           
(package private)  org.eclipse.swt.widgets.Composite layoutComposite
           
(package private)  org.eclipse.swt.widgets.Group layoutGroup
           
(package private)  java.lang.String[] names
           
(package private)  org.eclipse.swt.widgets.TableItem newItem
           
(package private)  org.eclipse.swt.custom.SashForm sash
           
(package private)  org.eclipse.swt.events.SelectionListener selectionListener
           
(package private)  org.eclipse.swt.widgets.Button size
           
(package private)  org.eclipse.swt.widgets.Composite tabFolderPage
           
(package private)  org.eclipse.swt.widgets.Table table
           
(package private)  org.eclipse.swt.events.TraverseListener traverseListener
           
 
Constructor Summary
Tab(LayoutExample instance)
          Creates the Tab within a given instance of LayoutExample.
 
Method Summary
(package private)  void createChildGroup()
          Creates the "child" group.
(package private)  void createChildWidgets()
          Creates the controls for modifying the "children" table, and the table itself.
(package private)  void createComboEditor(org.eclipse.swt.custom.CCombo combo, org.eclipse.swt.custom.TableEditor comboEditor)
          Creates the TableEditor with a CCombo in the first column of the table.
(package private)  void createControlGroup()
          Creates the "control" group.
(package private)  void createControlWidgets()
          Creates the "control" widget children.
(package private)  void createLayout()
          Creates the example layout.
(package private)  void createLayoutComposite()
          Creates the composite that contains the example layout.
(package private)  void createLayoutGroup()
          Creates the layout group.
(package private)  org.eclipse.swt.widgets.Composite createTabFolderPage(org.eclipse.swt.widgets.TabFolder tabFolder)
          Creates the tab folder page.
(package private)  void createTextEditor(org.eclipse.swt.widgets.Text text, org.eclipse.swt.custom.TableEditor textEditor, int column)
          Creates the TableEditor with a Text in the given column of the table.
(package private)  void disposeEditors()
          Disposes the editors without placing their contents into the table.
(package private)  java.lang.StringBuffer generateCode()
          Generates the code needed to produce the example layout.
(package private)  java.lang.StringBuffer generateLayoutCode()
          Generates layout specific code for the example layout.
(package private)  java.lang.StringBuffer getChildCode(org.eclipse.swt.widgets.Control control, int i)
          Returns the StringBuffer for the code which will create a child control.
(package private)  java.lang.String[] getLayoutDataFieldNames()
          Returns the layout data field names.
(package private)  java.lang.String getTabText()
          Gets the text for the tab folder item.
(package private)  void refreshLayoutComposite()
          Refreshes the composite and draws all controls in the layout example.
(package private)  void resetEditors()
          Takes information from TableEditors and stores it.
(package private)  void resetEditors(boolean tab)
           
(package private)  void setLayoutData()
          Sets the layout data for the children of the layout.
(package private)  void setLayoutState()
          Sets the state of the layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tabFolderPage

org.eclipse.swt.widgets.Composite tabFolderPage

sash

org.eclipse.swt.custom.SashForm sash

layoutGroup

org.eclipse.swt.widgets.Group layoutGroup

controlGroup

org.eclipse.swt.widgets.Group controlGroup

childGroup

org.eclipse.swt.widgets.Group childGroup

layoutComposite

org.eclipse.swt.widgets.Composite layoutComposite

names

java.lang.String[] names

children

org.eclipse.swt.widgets.Control[] children

size

org.eclipse.swt.widgets.Button size

add

org.eclipse.swt.widgets.Button add

delete

org.eclipse.swt.widgets.Button delete

clear

org.eclipse.swt.widgets.Button clear

code

org.eclipse.swt.widgets.Button code

table

org.eclipse.swt.widgets.Table table

index

int index

newItem

org.eclipse.swt.widgets.TableItem newItem

lastSelected

org.eclipse.swt.widgets.TableItem lastSelected

data

java.util.Vector data

instance

final LayoutExample instance

selectionListener

org.eclipse.swt.events.SelectionListener selectionListener

traverseListener

org.eclipse.swt.events.TraverseListener traverseListener
Constructor Detail

Tab

Tab(LayoutExample instance)
Creates the Tab within a given instance of LayoutExample.

Method Detail

createChildGroup

void createChildGroup()
Creates the "child" group. This is the group that allows you to add children to the layout. It exists within the controlGroup.


createChildWidgets

void createChildWidgets()
Creates the controls for modifying the "children" table, and the table itself. Subclasses override this method to augment the standard table.


createComboEditor

void createComboEditor(org.eclipse.swt.custom.CCombo combo,
                       org.eclipse.swt.custom.TableEditor comboEditor)
Creates the TableEditor with a CCombo in the first column of the table. This CCombo lists all the controls that the user can select to place on their layout.


createControlGroup

void createControlGroup()
Creates the "control" group. This is the group on the right half of each example tab. It contains controls for adding new children to the layoutComposite, and for modifying the children's layout data.


createControlWidgets

void createControlWidgets()
Creates the "control" widget children. Subclasses override this method to augment the standard controls created.


createLayout

void createLayout()
Creates the example layout. Subclasses override this method.


createLayoutComposite

void createLayoutComposite()
Creates the composite that contains the example layout.


createLayoutGroup

void createLayoutGroup()
Creates the layout group. This is the group on the left half of each example tab.


createTabFolderPage

org.eclipse.swt.widgets.Composite createTabFolderPage(org.eclipse.swt.widgets.TabFolder tabFolder)
Creates the tab folder page.

Parameters:
tabFolder - org.eclipse.swt.widgets.TabFolder
Returns:
the new page for the tab folder

createTextEditor

void createTextEditor(org.eclipse.swt.widgets.Text text,
                      org.eclipse.swt.custom.TableEditor textEditor,
                      int column)
Creates the TableEditor with a Text in the given column of the table.


disposeEditors

void disposeEditors()
Disposes the editors without placing their contents into the table. Subclasses override this method.


generateCode

java.lang.StringBuffer generateCode()
Generates the code needed to produce the example layout.


generateLayoutCode

java.lang.StringBuffer generateLayoutCode()
Generates layout specific code for the example layout. Subclasses override this method.


getChildCode

java.lang.StringBuffer getChildCode(org.eclipse.swt.widgets.Control control,
                                    int i)
Returns the StringBuffer for the code which will create a child control.


getLayoutDataFieldNames

java.lang.String[] getLayoutDataFieldNames()
Returns the layout data field names. Subclasses override this method.


getTabText

java.lang.String getTabText()
Gets the text for the tab folder item. Subclasses override this method.


refreshLayoutComposite

void refreshLayoutComposite()
Refreshes the composite and draws all controls in the layout example.


resetEditors

void resetEditors()
Takes information from TableEditors and stores it. Subclasses override this method.


resetEditors

void resetEditors(boolean tab)

setLayoutData

void setLayoutData()
Sets the layout data for the children of the layout. Subclasses override this method.


setLayoutState

void setLayoutState()
Sets the state of the layout. Subclasses override this method.