pl.edu.agh.cast.data.ui.importer.wizard
Class ValidationPageComposite

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 pl.edu.agh.cast.data.ui.importer.wizard.ValidationPageComposite
All Implemented Interfaces:
EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.graphics.Drawable, org.eclipse.swt.internal.SWTEventListener

public class ValidationPageComposite
extends org.eclipse.swt.widgets.Composite
implements org.eclipse.swt.events.SelectionListener

Main composite of the ValidationPage.

Author:
AGH CAST Team

Field Summary
protected  BrokenDataInfo errors
          Statistics after data validation, containing information about all errors.
protected  org.eclipse.jface.viewers.TableViewer errorsTableViewer
          Viewer for errors table.
 
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
 
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
 
Constructor Summary
ValidationPageComposite(org.eclipse.swt.widgets.Composite parent, int style, ValidationPage mediator)
          The default constructor.
 
Method Summary
 void deleteErrors(List<BrokenCellInfo> errs)
          Deletes rows containing the specified cells with errors.
protected  int getCurrentIgnoredLinesCount()
           
protected  int getIgnoredLinesCount()
           
protected  int[] getSelectedErrors()
           
protected  void handleDeleteAllButtonAction()
           
protected  void handleDeleteButtonAction()
           
protected  void handleDeleteErrorsByTypeAction()
           
protected  void handleDeleteRowAction()
           
protected  void handleEditCellAction(BrokenCellInfo cell)
           
protected  void handleIgnoreFirstLines()
           
protected  void handleIgnoreLinesModifyText()
           
protected  void handleReplaceDefaultValueAction(BrokenCellInfo cellInfo)
           
protected  void handleShowAllColumnsAction()
           
 boolean isChooseMainEntity()
           
 boolean isCreateDiagram()
           
 boolean isIgnoreFirstLine()
           
 void setData(TabularData dat, Template tmpl, BrokenDataInfo errs)
          Sets the validation page composite data.
 void validateRow(DataRow row)
          Delegate to ValidationPage.validateRow(DataRow) method.
 void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent arg0)
          
 void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
          
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, 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, getListeners, 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

errorsTableViewer

protected org.eclipse.jface.viewers.TableViewer errorsTableViewer
Viewer for errors table.


errors

protected BrokenDataInfo errors
Statistics after data validation, containing information about all errors.

Constructor Detail

ValidationPageComposite

public ValidationPageComposite(org.eclipse.swt.widgets.Composite parent,
                               int style,
                               ValidationPage mediator)
The default constructor.

Parameters:
parent - the parent composite
style - the style of widget to construct
mediator - the mediating wizard page
Method Detail

setData

public void setData(TabularData dat,
                    Template tmpl,
                    BrokenDataInfo errs)
Sets the validation page composite data.

Parameters:
dat - the data to import
tmpl - the import template
errs - the errors information

validateRow

public void validateRow(DataRow row)
Delegate to ValidationPage.validateRow(DataRow) method. Besides validating the specified data row, it refreshes the errors table viewer and updates the statistics.

Parameters:
row - the row to validate

isIgnoreFirstLine

public boolean isIgnoreFirstLine()

isCreateDiagram

public boolean isCreateDiagram()

isChooseMainEntity

public boolean isChooseMainEntity()

handleDeleteButtonAction

protected void handleDeleteButtonAction()

handleDeleteRowAction

protected void handleDeleteRowAction()

handleDeleteAllButtonAction

protected void handleDeleteAllButtonAction()

handleDeleteErrorsByTypeAction

protected void handleDeleteErrorsByTypeAction()

handleShowAllColumnsAction

protected void handleShowAllColumnsAction()

handleIgnoreFirstLines

protected void handleIgnoreFirstLines()

handleEditCellAction

protected void handleEditCellAction(BrokenCellInfo cell)

handleReplaceDefaultValueAction

protected void handleReplaceDefaultValueAction(BrokenCellInfo cellInfo)

handleIgnoreLinesModifyText

protected void handleIgnoreLinesModifyText()

widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent arg0)

Specified by:
widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener
See Also:
SelectionListener.widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent event)

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener
See Also:
SelectionListener.widgetSelected(org.eclipse.swt.events.SelectionEvent)

deleteErrors

public void deleteErrors(List<BrokenCellInfo> errs)
Deletes rows containing the specified cells with errors.

Parameters:
errs - the errors to delete

getSelectedErrors

protected int[] getSelectedErrors()

getIgnoredLinesCount

protected int getIgnoredLinesCount()

getCurrentIgnoredLinesCount

protected int getCurrentIgnoredLinesCount()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.