com.im.ijc.widgets/1 5.9.1

com.im.ijc.widgets.table
Class WBTableWidget

java.lang.Object
  extended by com.im.ijc.widgets.abstractwidget.AbstractWidget<S>
      extended by com.im.ijc.widgets.table.AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>
          extended by com.im.ijc.widgets.table.WBTableWidget
All Implemented Interfaces:
ConditionalFormattingWidget, RendererCookie, IJCWidget, IJCWidget.Cacheable, IJCWidget.Customizable<WBTableSettings>, IJCWidget.DesignerHandle, IJCWidget.Editable, IJCWidget.Queryable, IJCWidget.Releaseable, IJCWidget.RendererProvider, IJCWidget.Updateable, IJCWidget.Viewable, com.im.ijc.jrprinting.JRPrintable, PropertyChangeListener, EventListener, ListSelectionListener, Node.Cookie

public final class WBTableWidget
extends AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>
implements IJCWidget.Editable, ListSelectionListener, PropertyChangeListener, com.im.ijc.jrprinting.JRPrintable


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.im.ijc.core.api.views.IJCWidget
IJCWidget.Breakable, IJCWidget.Cacheable, IJCWidget.Configurable, IJCWidget.Customizable<S>, IJCWidget.DesignerHandle, IJCWidget.Editable, IJCWidget.GroupCustomizable<N extends Node>, IJCWidget.HyperlinkAble, IJCWidget.Popupable, IJCWidget.Queryable, IJCWidget.Releaseable, IJCWidget.RendererCallback, IJCWidget.RendererProvider, IJCWidget.Updateable, IJCWidget.Viewable, IJCWidget.WidgetContainerHandle<S>
 
Field Summary
 
Fields inherited from class com.im.ijc.widgets.table.AbstractTableWidget
browseModePanel, buildModeRenderer, buildTable, editStarted, queryModePanel, queryTable, selectedFields, table, temporaryBoundFieldsHolder
 
Fields inherited from interface com.im.ijc.core.api.views.IJCWidget
PROP_BOUND_FIELDS, PROP_SELECTED_FIELDS, PROP_VERTEX_STATE, PROP_VIEW, PROP_VIEW_MODE
 
Fields inherited from interface com.im.ijc.core.api.views.IJCWidget.Customizable
PROP_SETTINGS
 
Constructor Summary
WBTableWidget(String factoryId, DFView view)
           
 
Method Summary
protected  void applyWidgetSettings(TableSettingsNode n)
          Applies changes done to node from createWidgetSettingsNode().
protected  void buildDesignTable()
          Initializes build table with columns names and couple of rows containing synthetic values.
protected  void cleanQueryAndBrowseMode()
           
protected  boolean confirmSuitableWidgetUsed(DFDataTree dataTree, List<DFField> fields)
          Predicate type of method to test if it makes sense to bind passed set of fields to this widget.
protected  Component createBuildTableHeaderView(JTable buildTable, JScrollPane scroller)
           
protected  TableSettingsNode createWidgetSettingsNode()
          Creates a node used by Customizable or GroupCustomizable implementations.
 void customizeUISettings()
           
protected  Dimension defaultWidgetDimension()
           
 List<DFField> getBoundFields()
           
 Dimension getPrintDimension()
          A print dimension for grid view to find how to scale output report.
 Object getRenderer()
           
 Object getRendererForField(DFField field)
           
 void getTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder, Rectangle2D printPosition, boolean scaledDown)
           
 WBTableSettings getWidgetSettings()
           
 boolean isMultipleRow()
           
 boolean isRowCountVisible()
           
 boolean isSelectionEditable()
           
 boolean isSelectionViewable()
           
protected  void modeChanged(ViewMode oldMode, ViewMode newMode)
           
 void propertyChange(PropertyChangeEvent evt)
           
 void setInGridView(boolean inGridView)
           
 void setVertexState(DFResultSet.VertexState vertexState)
           
 void showViewer()
           
 void startEdit()
           
 void stopEdit(boolean store)
           
 void updateSettings(WBTableSettings tSettings)
           
 void valueChanged(ListSelectionEvent e)
           
 
Methods inherited from class com.im.ijc.widgets.table.AbstractTableWidget
bind, createBorderSupport, createCellTemplate, createRowOrColumnHeaderTemplate, doBind, getBorder, getBrowseModeComponent, getBuildModeRenderer, getClassifier, getConditionalFormatting, getDisplayTitle, getEditQueryComponent, getQueryModeComponent, getSelectedFields, getTable, getVertexState, isCFEnabled, isFocusable, isRebindable, releaseWidget, resetCache, setConditionalFormatting, setEditHighlight, storeSettings, updateBindStatus, updateBorders, updateCellSizes, updateValue
 
Methods inherited from class com.im.ijc.widgets.abstractwidget.AbstractWidget
addPropertyChangeListener, firePropertyChange, getFactoryId, getForm, getFormData, getLookup, getView, getViewMode, instanceContent, putUniquelyIntoLookup, removePropertyChangeListener, setSettings, setViewMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.im.ijc.core.api.views.IJCWidget
addPropertyChangeListener, getForm, getLookup, getView, getViewMode, removePropertyChangeListener
 

Constructor Detail

WBTableWidget

public WBTableWidget(String factoryId,
                     DFView view)
Method Detail

setInGridView

public void setInGridView(boolean inGridView)

cleanQueryAndBrowseMode

protected void cleanQueryAndBrowseMode()
Specified by:
cleanQueryAndBrowseMode in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

defaultWidgetDimension

protected Dimension defaultWidgetDimension()
Specified by:
defaultWidgetDimension in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

setVertexState

public void setVertexState(DFResultSet.VertexState vertexState)
Specified by:
setVertexState in interface IJCWidget.DesignerHandle

buildDesignTable

protected void buildDesignTable()
Initializes build table with columns names and couple of rows containing synthetic values.

Specified by:
buildDesignTable in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

createBuildTableHeaderView

protected Component createBuildTableHeaderView(JTable buildTable,
                                               JScrollPane scroller)
Specified by:
createBuildTableHeaderView in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

getBoundFields

public List<DFField> getBoundFields()
Specified by:
getBoundFields in interface IJCWidget
Specified by:
getBoundFields in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

valueChanged

public void valueChanged(ListSelectionEvent e)
Specified by:
valueChanged in interface ListSelectionListener

getWidgetSettings

public WBTableSettings getWidgetSettings()
Specified by:
getWidgetSettings in interface IJCWidget.Customizable<WBTableSettings>
Overrides:
getWidgetSettings in class AbstractWidget<WBTableSettings>

updateSettings

public void updateSettings(WBTableSettings tSettings)
Specified by:
updateSettings in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

createWidgetSettingsNode

protected TableSettingsNode createWidgetSettingsNode()
Creates a node used by Customizable or GroupCustomizable implementations.

Specified by:
createWidgetSettingsNode in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

applyWidgetSettings

protected void applyWidgetSettings(TableSettingsNode n)
Applies changes done to node from createWidgetSettingsNode().

Specified by:
applyWidgetSettings in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

customizeUISettings

public void customizeUISettings()
Specified by:
customizeUISettings in interface IJCWidget.Customizable<WBTableSettings>

isSelectionEditable

public boolean isSelectionEditable()
Specified by:
isSelectionEditable in interface IJCWidget.Editable

startEdit

public void startEdit()
Specified by:
startEdit in interface IJCWidget.Editable

isSelectionViewable

public boolean isSelectionViewable()
Specified by:
isSelectionViewable in interface IJCWidget.Viewable

isRowCountVisible

public boolean isRowCountVisible()

showViewer

public void showViewer()
Specified by:
showViewer in interface IJCWidget.Viewable

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

modeChanged

protected void modeChanged(ViewMode oldMode,
                           ViewMode newMode)
Overrides:
modeChanged in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

stopEdit

public void stopEdit(boolean store)
Specified by:
stopEdit in interface IJCWidget.Editable

getPrintDimension

public Dimension getPrintDimension()
A print dimension for grid view to find how to scale output report.

Returns:
the computed dimension

getTemplate

public void getTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder,
                        Rectangle2D printPosition,
                        boolean scaledDown)
                 throws net.sf.jasperreports.engine.JRException
Specified by:
getTemplate in interface com.im.ijc.jrprinting.JRPrintable
Throws:
net.sf.jasperreports.engine.JRException

isMultipleRow

public boolean isMultipleRow()
Specified by:
isMultipleRow in interface IJCWidget

getRenderer

public Object getRenderer()
Specified by:
getRenderer in interface RendererCookie

getRendererForField

public Object getRendererForField(DFField field)
Specified by:
getRendererForField in interface IJCWidget.RendererProvider

confirmSuitableWidgetUsed

protected boolean confirmSuitableWidgetUsed(DFDataTree dataTree,
                                            List<DFField> fields)
Description copied from class: AbstractTableWidget
Predicate type of method to test if it makes sense to bind passed set of fields to this widget. Implementation can defer binding here or ask user for confirmation.

Overrides:
confirmSuitableWidgetUsed in class AbstractTableWidget<WBTableSettings,WBTable,TableSettingsNode>

com.im.ijc.widgets/1 5.9.1