net.xoetrope.swt
Class XDialogTable

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.XSwtPage
                      extended by net.xoetrope.swt.XDialog
                          extended by net.xoetrope.swt.XDialogTable
All Implemented Interfaces:
XExceptionHandler, PageSupport, XAttributedComponent, XContentPane, XPage.IXDialog, org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
XDialogTableAddColumn, XDialogTableAddItem, XDialogTableSetValueColumnItem

public abstract class XDialogTable
extends XDialog

Abstract class which extends XDialog for the SWT Tables


Field Summary
protected  XLabel[] borders
           
static int H_GAP
           
protected  int height
           
static int HEIGHT_BUTTON
           
static int HEIGHT_FULL
           
static int HEIGHT_SPACING
           
static int V_GAP
           
protected  java.lang.String value
           
protected  int width
           
static int WIDTH_SPACING
           
protected  int widthLabel
           
protected  XButton[] xbs
           
protected  XEdit[] xes
           
protected  XEditTable xet
           
protected  XLabel[] xls
           
 
Fields inherited from class net.xoetrope.swt.XDialog
CANCEL_CLICKED, CLOSE_CLICKED, closeButtonID, contentPanel, DEFAULT_PADDING, focusComponent, lastReturnValue, NO_CLICKED, NOTHING_CLICKED_YET, OK_CLICKED, padding, returnObject, returnValue, saveOnClose, shell, trueField, WIDTH_BORDER_CENTER
 
Fields inherited from class net.xoetrope.swt.XSwtPage
adapter, componentFactory, COOLITEM, pageHelper, pageMgr, project, rootModel
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
XDialogTable(XEditTable xet, java.lang.String title, int nbLabels)
          Creates a new dialogtable.
 
Method Summary
 void addButtons(java.lang.String name, java.lang.String text)
          Add the buttons
 void cancel()
          Close the dialog
 void finalstep()
          Fill the content panel with all the components
abstract  void firststep()
          Do the first step of the dialog edition
abstract  void fourthstep()
          Do the fourth step of the dialog edition
 XLabel getBorder(int x, int y, int width, int height)
          Get a label which reprensent a border
 XEdit getEdit(int x, int y, int width, int height, java.lang.String s)
          Get a edit
 XLabel getLabel(int x, int y, int width, int height, java.lang.String s)
          Get a label
 void init()
          Init the values
 void resetAll()
          Reset all the edit components
abstract  void secondstep()
          Do the second step of the dialog edition
 java.lang.String show()
          Show the dialog
abstract  void thirdstep()
          Do the third step of the dialog edition
 
Methods inherited from class net.xoetrope.swt.XDialog
cancelDlg, checkSubclass, closeDlg, getContentPane, getFocusComponent, getLastReturnValue, getMinimumSize, getPreferredSize, getReturnObject, pack, pageCreated, setBackground, setCaption, setFont, setForeground, setLocation, setModal, setResizable, setSaveOnClose, setSize, setUseNativeHeaders, showDialog, showDialog, showDialog, showModalWindow, SWTtoAWT, wasMouseClicked
 
Methods inherited from class net.xoetrope.swt.XSwtPage
accumulateMessages, addBinding, addHandler, addHandler, addListener, addValidation, addValidation, addValidation, checkValidations, clearValidations, doLayout, evaluateAttribute, evaluatePath, findComponent, findComponent, getAttribute, getAttribute, getBinding, getBinding, getBindings, getComponentFactory, getComponentName, getCurrentEvent, getEventAttribute, getEventHandler, getExtension, getName, getOwner, getPageSize, getProject, getStatus, getValidationHandler, handleEventHandlerException, handleException, isFocusChangeSuppressed, pageActivated, pageDeactivated, removeBinding, saveBoundComponentValues, setAttribute, setAttribute, setBackground, setClearPage, setComponentFactory, setEventHandler, setExceptionHandler, setExtension, setLayout, setName, setStatus, setValidationFactory, showComponents, showHandCursor, showMessage, showMessage, stripAttributeValues, translate, updateBinding, updateBindings, updateBoundComponentValues, validate, validationHandler, wasMouseDoubleClicked, wasMouseRightClicked
 
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, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setLayoutData, setLocation, setMenu, setParent, setRedraw, 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
 
Methods inherited from interface net.xoetrope.xui.PageSupport
accumulateMessages, addBinding, addHandler, addHandler, addListener, addValidation, addValidation, addValidation, checkValidations, clearValidations, doLayout, evaluateAttribute, evaluatePath, findComponent, findComponent, getAttribute, getAttribute, getBinding, getBinding, getBindings, getComponentFactory, getComponentName, getCurrentEvent, getEventAttribute, getEventHandler, getExtension, getName, getOwner, getPageSize, getProject, getStatus, getValidationHandler, handleEventHandlerException, handleException, isFocusChangeSuppressed, pageActivated, pageDeactivated, removeBinding, saveBoundComponentValues, setAttribute, setBackground, setClearPage, setComponentFactory, setEventHandler, setExceptionHandler, setExtension, setLayout, setLocation, setName, setStatus, setValidationFactory, setVisible, showComponents, showHandCursor, showMessage, showMessage, stripAttributeValues, translate, updateBinding, updateBindings, updateBoundComponentValues, validate, validationHandler, wasMouseDoubleClicked, wasMouseRightClicked
 

Field Detail

HEIGHT_FULL

public static final int HEIGHT_FULL
See Also:
Constant Field Values

WIDTH_SPACING

public static final int WIDTH_SPACING
See Also:
Constant Field Values

HEIGHT_SPACING

public static final int HEIGHT_SPACING
See Also:
Constant Field Values

H_GAP

public static final int H_GAP
See Also:
Constant Field Values

V_GAP

public static final int V_GAP
See Also:
Constant Field Values

HEIGHT_BUTTON

public static final int HEIGHT_BUTTON
See Also:
Constant Field Values

xet

protected XEditTable xet

xls

protected XLabel[] xls

borders

protected XLabel[] borders

xes

protected XEdit[] xes

xbs

protected XButton[] xbs

widthLabel

protected int widthLabel

width

protected int width

height

protected int height

value

protected java.lang.String value
Constructor Detail

XDialogTable

public XDialogTable(XEditTable xet,
                    java.lang.String title,
                    int nbLabels)
Creates a new dialogtable.

Parameters:
xet - the table
title - the title of the dialog
nbLabels - the number of Label object in the dialog
Method Detail

show

public java.lang.String show()
Show the dialog


init

public void init()
Init the values

Overrides:
init in class XDialog

addButtons

public void addButtons(java.lang.String name,
                       java.lang.String text)
Add the buttons

Parameters:
name - name of the button
text - text of the button

finalstep

public void finalstep()
Fill the content panel with all the components


getBorder

public XLabel getBorder(int x,
                        int y,
                        int width,
                        int height)
Get a label which reprensent a border

Parameters:
x - x-coordinate
width - width of the label
height - height of the label
Returns:
the label created

getLabel

public XLabel getLabel(int x,
                       int y,
                       int width,
                       int height,
                       java.lang.String s)
Get a label

Parameters:
x - x-coordinate
width - width of the label
height - height of the label
s - text of the label
Returns:
the label created

getEdit

public XEdit getEdit(int x,
                     int y,
                     int width,
                     int height,
                     java.lang.String s)
Get a edit

Parameters:
x - x-coordinate
width - width of the label
height - height of the label
s - text of the label
Returns:
the edit created

resetAll

public void resetAll()
Reset all the edit components


cancel

public void cancel()
Close the dialog


firststep

public abstract void firststep()
Do the first step of the dialog edition


secondstep

public abstract void secondstep()
Do the second step of the dialog edition


thirdstep

public abstract void thirdstep()
Do the third step of the dialog edition


fourthstep

public abstract void fourthstep()
Do the fourth step of the dialog edition