com.im.ijc.widgets.table
Class AbstractTableWidget<S extends TableWidgetSettings,T extends AbstractWBTable,N extends Node>
java.lang.Object
com.im.ijc.widgets.abstractwidget.AbstractWidget<S>
com.im.ijc.widgets.table.AbstractTableWidget<S,T,N>
- All Implemented Interfaces:
- ConditionalFormattingWidget, RendererCookie, IJCWidget, IJCWidget.Cacheable, IJCWidget.Customizable<S>, IJCWidget.DesignerHandle, IJCWidget.Queryable, IJCWidget.Releaseable, IJCWidget.RendererProvider, IJCWidget.Updateable, IJCWidget.Viewable, Node.Cookie
- Direct Known Subclasses:
- WBTableWidget
public abstract class AbstractTableWidget<S extends TableWidgetSettings,T extends AbstractWBTable,N extends Node>
- extends AbstractWidget<S>
- implements IJCWidget.Viewable, IJCWidget.Queryable, IJCWidget.Cacheable, ConditionalFormattingWidget, IJCWidget.RendererProvider, IJCWidget.Releaseable
| 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> |
|
Method Summary |
protected abstract void |
applyWidgetSettings(N n)
Applies changes done to node from createWidgetSettingsNode(). |
void |
bind(List<? extends DFField> fields)
|
protected abstract void |
buildDesignTable()
|
protected abstract 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 BorderSupport |
createBorderSupport()
|
protected abstract Component |
createBuildTableHeaderView(JTable buildTable,
JScrollPane scroller)
|
protected void |
createCellTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder,
TableCellRenderer renderer,
DFField field,
Rectangle2D position,
Rectangle2D framePosition)
Creates JRXML snippet to render a cell into a Jasper Report. |
protected void |
createRowOrColumnHeaderTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder,
String text,
int hAlign,
Font font,
Color bgColor,
Rectangle2D position,
boolean inColumnSection)
Creates JRXML snippet to render a name of the field into a Jasper Report. |
protected abstract N |
createWidgetSettingsNode()
Creates a node used by Customizable or GroupCustomizable implementations. |
protected abstract Dimension |
defaultWidgetDimension()
|
boolean |
doBind(DFDataTree dataTree)
|
protected WidgetBorder |
getBorder()
|
abstract List<DFField> |
getBoundFields()
|
JComponent |
getBrowseModeComponent()
|
JComponent |
getBuildModeRenderer()
|
CFClassifier |
getClassifier()
|
CFExpressionSetFieldBinding |
getConditionalFormatting()
|
protected String |
getDisplayTitle()
|
JComponent |
getEditQueryComponent()
|
JComponent |
getQueryModeComponent()
|
List<DFField> |
getSelectedFields()
|
T |
getTable()
|
DFResultSet.VertexState |
getVertexState()
|
boolean |
isCFEnabled()
|
boolean |
isFocusable()
|
boolean |
isRebindable()
|
protected void |
modeChanged(ViewMode oldMode,
ViewMode newMode)
|
void |
releaseWidget()
|
void |
resetCache(boolean all)
|
void |
setConditionalFormatting(CFExpressionSetFieldBinding expressionSetFieldBinding)
|
protected void |
setEditHighlight(boolean editStarted)
|
void |
storeSettings()
|
protected void |
updateBindStatus()
|
void |
updateBorders()
|
protected void |
updateCellSizes(JTable src,
JTable dest)
|
abstract void |
updateSettings(S tSettings)
|
void |
updateValue()
|
| Methods inherited from class com.im.ijc.widgets.abstractwidget.AbstractWidget |
addPropertyChangeListener, firePropertyChange, getFactoryId, getForm, getFormData, getLookup, getView, getViewMode, getWidgetSettings, instanceContent, putUniquelyIntoLookup, removePropertyChangeListener, setSettings, setViewMode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buildModeRenderer
protected JComponent buildModeRenderer
queryModePanel
protected final JPanel queryModePanel
browseModePanel
protected final JPanel browseModePanel
table
protected T extends AbstractWBTable table
buildTable
protected JTable buildTable
queryTable
protected JTable queryTable
selectedFields
protected List<DFField> selectedFields
temporaryBoundFieldsHolder
protected List<DFField> temporaryBoundFieldsHolder
editStarted
protected boolean editStarted
AbstractTableWidget
public AbstractTableWidget(String factoryId,
DFView view)
modeChanged
protected void modeChanged(ViewMode oldMode,
ViewMode newMode)
- Specified by:
modeChanged in class AbstractWidget<S extends TableWidgetSettings>
getBrowseModeComponent
public final JComponent getBrowseModeComponent()
- Specified by:
getBrowseModeComponent in interface IJCWidget.DesignerHandle
defaultWidgetDimension
protected abstract Dimension defaultWidgetDimension()
getBuildModeRenderer
public final JComponent getBuildModeRenderer()
- Specified by:
getBuildModeRenderer in interface IJCWidget.DesignerHandle
releaseWidget
public void releaseWidget()
- Specified by:
releaseWidget in interface IJCWidget.Releaseable
createBuildTableHeaderView
protected abstract Component createBuildTableHeaderView(JTable buildTable,
JScrollPane scroller)
getTable
public final T getTable()
confirmSuitableWidgetUsed
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.
Implementation can defer binding here or ask user for confirmation.
cleanQueryAndBrowseMode
protected abstract void cleanQueryAndBrowseMode()
bind
public final void bind(List<? extends DFField> fields)
- Specified by:
bind in interface IJCWidget.DesignerHandle
doBind
public final boolean doBind(DFDataTree dataTree)
- Specified by:
doBind in interface IJCWidget.DesignerHandle
updateCellSizes
protected void updateCellSizes(JTable src,
JTable dest)
getDisplayTitle
protected String getDisplayTitle()
- Returns:
- specified title or reasonable default for the widget
updateBindStatus
protected final void updateBindStatus()
buildDesignTable
protected abstract void buildDesignTable()
getBoundFields
public abstract List<DFField> getBoundFields()
- Specified by:
getBoundFields in interface IJCWidget
getVertexState
public final DFResultSet.VertexState getVertexState()
- Specified by:
getVertexState in interface IJCWidget
getSelectedFields
public final List<DFField> getSelectedFields()
- Specified by:
getSelectedFields in interface IJCWidget
createWidgetSettingsNode
protected abstract N createWidgetSettingsNode()
- Creates a node used by
Customizable or GroupCustomizable implementations.
applyWidgetSettings
protected abstract void applyWidgetSettings(N n)
- Applies changes done to node from
createWidgetSettingsNode().
updateSettings
public abstract void updateSettings(S tSettings)
setEditHighlight
protected final void setEditHighlight(boolean editStarted)
storeSettings
public final void storeSettings()
isRebindable
public final boolean isRebindable()
- Specified by:
isRebindable in interface IJCWidget.DesignerHandle
resetCache
public final void resetCache(boolean all)
- Specified by:
resetCache in interface IJCWidget.Cacheable
updateValue
public final void updateValue()
- Specified by:
updateValue in interface IJCWidget.Updateable
isFocusable
public final boolean isFocusable()
- Specified by:
isFocusable in interface IJCWidget.DesignerHandle
getQueryModeComponent
public final JComponent getQueryModeComponent()
- Specified by:
getQueryModeComponent in interface IJCWidget.Queryable
getEditQueryComponent
public final JComponent getEditQueryComponent()
- Specified by:
getEditQueryComponent in interface IJCWidget.Queryable
createCellTemplate
protected void createCellTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder,
TableCellRenderer renderer,
DFField field,
Rectangle2D position,
Rectangle2D framePosition)
throws net.sf.jasperreports.engine.JRException
- Creates JRXML snippet to render a cell into a Jasper Report.
- Parameters:
position - printed rectangle within formframePosition - rectangle wrapping the table cell using print! coordinates
- Throws:
net.sf.jasperreports.engine.JRException
createRowOrColumnHeaderTemplate
protected void createRowOrColumnHeaderTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder,
String text,
int hAlign,
Font font,
Color bgColor,
Rectangle2D position,
boolean inColumnSection)
throws net.sf.jasperreports.engine.JRException
- Creates JRXML snippet to render a name of the field into a Jasper Report.
- Parameters:
position - rectangle already scaled to print coordinates
- Throws:
net.sf.jasperreports.engine.JRException
isCFEnabled
public boolean isCFEnabled()
- Specified by:
isCFEnabled in interface ConditionalFormattingWidget
getClassifier
public CFClassifier getClassifier()
- Specified by:
getClassifier in interface ConditionalFormattingWidget
getConditionalFormatting
public CFExpressionSetFieldBinding getConditionalFormatting()
- Specified by:
getConditionalFormatting in interface ConditionalFormattingWidget
setConditionalFormatting
public void setConditionalFormatting(CFExpressionSetFieldBinding expressionSetFieldBinding)
- Specified by:
setConditionalFormatting in interface ConditionalFormattingWidget
getBorder
protected WidgetBorder getBorder()
- Overrides:
getBorder in class AbstractWidget<S extends TableWidgetSettings>
createBorderSupport
protected BorderSupport createBorderSupport()
updateBorders
public void updateBorders()