|
com.im.ijc.widgets/1 5.9.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.ijc.widgets.abstractwidget.AbstractWidget<CS>
com.im.ijc.widgets.abstractwidget.AbstractBindingWidget<CS>
public abstract class AbstractBindingWidget<CS extends CommonWidgetSettings>
A common superclass for widgets bound to some field(s).
| 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 | |
|---|---|
protected BorderSupport |
borderSupport
|
| 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 | |
|---|---|
AbstractBindingWidget(String factoryId,
DFView view,
CS settings)
|
|
| Method Summary | |
|---|---|
protected Dimension |
adjustPreferredSizeForTitledBorder(JComponent comp,
boolean extend)
Adjust preferred size of the given component by delta equal to 2*title-border-spacing. |
protected abstract void |
changingSelection(SelectionDescription from,
SelectionDescription to)
Notifies about change in selection from from selection to
to selection. |
protected boolean |
confirmSuitableWidgetUsed(DFDataTree dataTree,
List<DFField> fields)
|
protected abstract BindFieldAcceptor |
createBindAcceptor()
Returns fields to which this widget is able to bind. |
protected boolean |
doBind(DFDataTree dataTree,
BindFieldPanel.BackgroundCheck backgroundCheck)
|
boolean |
doBindSingleField(DFDataTree dataTree,
BindFieldPanel.BackgroundCheck backgroundCheck)
|
protected WidgetBorder |
getBorder()
|
JComponent |
getBrowseModeComponent()
|
protected JPanel |
getBrowseModePanel()
|
protected Lookup.Provider |
getBrowseModeRenderer()
|
DFField |
getFirstField()
|
protected Set<DFRelationship.Type> |
getInappropriateRelationships()
It doesn't make sense to bind field from detailed entity with these relationships. |
protected JPanel |
getQueryModePanel()
|
List<? extends DFField> |
getSelectedFields()
|
String |
getTitle()
|
protected List<? extends DFField> |
getTitleFields()
Allows widget to use different fields then bound fields to be used for title composition. |
Font |
getTitleFont()
|
protected Pair<String,Font> |
getTitlePair()
|
protected String |
getTitleSeparator()
Title separator which is used for compounding title for widgets with multiple bound fields. |
protected String |
getUseMoreSuitableWidgetMessage(String widgetName)
|
DFResultSet.VertexState |
getVertexState()
Return widget's active DFResultSet.VertexState. |
protected static String |
getWidgetTypeDisplayName(String factoryId)
|
protected boolean |
ignoreQueryUpdateFromRS()
Can suppress widget update after change in working query. |
protected abstract boolean |
isBeingEdited()
|
protected boolean |
isConsistentVertexState(DFField field,
DFResultSet.VertexState vertexState)
|
protected boolean |
isConsistentVertexState(List<? extends DFField> fields,
DFResultSet.VertexState vs)
|
boolean |
isFocusable()
|
boolean |
isRebindable()
|
protected boolean |
keepFormSpaceWhenBorderChanges()
Whether to keep the form space the widget occupies when its border is
changed. |
protected void |
lastExecQueryUpdateWidgetFromRS(DFTermExpression lastExecutedQuery)
This method is invoked when PROP_LAST_EXECUTED_QUERY property is fired from DFResultSet which is this widget bound to. |
protected void |
modeChanged(ViewMode oldMode,
ViewMode newMode)
|
protected void |
queryUpdateWidgetFromRS(DFTermExpression workingQuery)
This method is invoked when PROP_WORKING_QUERY property is fired from DFResultSet which is this widget bound to. |
void |
releaseWidget()
|
protected void |
setSettings(CS settings)
|
protected boolean |
setVertexState(DFEntity entity)
|
void |
setVertexState(DFResultSet.VertexState vertexState)
|
protected boolean |
showSortDirectiveInBorder()
Determines whether to show sort directive when the border is of WidgetBorder.BorderType.TITLE_WITH_SORT
type. |
protected void |
updateBorders()
Updates border according to the WidgetBorder border info returned from
the getBorder(). |
protected void |
updatePanelBorder(JComponent panel,
String title)
Override with empty body if widget doesn't support border. |
void |
updateValue()
|
protected abstract void |
updateValues()
|
| Methods inherited from class com.im.ijc.widgets.abstractwidget.AbstractWidget |
|---|
addPropertyChangeListener, firePropertyChange, getFactoryId, getForm, getFormData, getLookup, getView, getViewMode, getWidgetSettings, instanceContent, putUniquelyIntoLookup, removePropertyChangeListener, 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.DesignerHandle |
|---|
bind, doBind, getBuildModeRenderer |
| Methods inherited from interface com.im.ijc.core.api.views.IJCWidget |
|---|
getBoundFields, isMultipleRow |
| Methods inherited from interface com.im.ijc.core.api.views.IJCWidget.Customizable |
|---|
customizeUISettings |
| Field Detail |
|---|
protected final BorderSupport borderSupport
| Constructor Detail |
|---|
public AbstractBindingWidget(String factoryId,
DFView view,
CS settings)
| Method Detail |
|---|
protected abstract void changingSelection(SelectionDescription from,
SelectionDescription to)
Notifies about change in selection from from selection to
to selection. Widget is supposed to react accordingly to the
change.
The method might be called from any thread.
from - old selectionto - new selectionprotected abstract void updateValues()
protected abstract BindFieldAcceptor createBindAcceptor()
protected abstract boolean isBeingEdited()
protected Dimension adjustPreferredSizeForTitledBorder(JComponent comp,
boolean extend)
2*title-border-spacing. Sign of the delta depends on the
given extend parameter.
comp - component to be adjustedextend - if true the size is extended; if false the size is shrunk by the given delta
protected boolean keepFormSpaceWhenBorderChanges()
border is
changed. E.g. when the border is changed to be hidden and this method returns true
the actual widget size is expanded about the size of the previously set border insets to fill
up kept original form space.
true to keep the space; false to let it change on border changeprotected boolean showSortDirectiveInBorder()
WidgetBorder.BorderType.TITLE_WITH_SORT
type.
true unless overridden by subclass.protected WidgetBorder getBorder()
getBorder in class AbstractWidget<CS extends CommonWidgetSettings>public void releaseWidget()
releaseWidget in interface IJCWidget.Releaseableprotected void setSettings(CS settings)
setSettings in class AbstractWidget<CS extends CommonWidgetSettings>public void setVertexState(DFResultSet.VertexState vertexState)
setVertexState in interface IJCWidget.DesignerHandlepublic DFResultSet.VertexState getVertexState()
DFResultSet.VertexState.
getVertexState in interface IJCWidgetnull e.g. in the case the widget instance was released.protected Lookup.Provider getBrowseModeRenderer()
protected boolean isConsistentVertexState(DFField field,
DFResultSet.VertexState vertexState)
protected boolean isConsistentVertexState(List<? extends DFField> fields,
DFResultSet.VertexState vs)
protected void queryUpdateWidgetFromRS(DFTermExpression workingQuery)
Can be overridden in subclasses.
workingQuery - The queryprotected boolean ignoreQueryUpdateFromRS()
public final DFField getFirstField()
protected boolean doBind(DFDataTree dataTree,
BindFieldPanel.BackgroundCheck backgroundCheck)
protected void lastExecQueryUpdateWidgetFromRS(DFTermExpression lastExecutedQuery)
Can be overridden in subclasses.
lastExecutedQuery - The query
protected void modeChanged(ViewMode oldMode,
ViewMode newMode)
modeChanged in class AbstractWidget<CS extends CommonWidgetSettings>public boolean isFocusable()
isFocusable in interface IJCWidget.DesignerHandlepublic List<? extends DFField> getSelectedFields()
getSelectedFields in interface IJCWidgetpublic boolean isRebindable()
isRebindable in interface IJCWidget.DesignerHandlepublic void updateValue()
updateValue in interface IJCWidget.Updateable
protected boolean confirmSuitableWidgetUsed(DFDataTree dataTree,
List<DFField> fields)
protected Set<DFRelationship.Type> getInappropriateRelationships()
protected String getUseMoreSuitableWidgetMessage(String widgetName)
public boolean doBindSingleField(DFDataTree dataTree,
BindFieldPanel.BackgroundCheck backgroundCheck)
protected boolean setVertexState(DFEntity entity)
protected static String getWidgetTypeDisplayName(String factoryId)
protected String getTitleSeparator()
protected List<? extends DFField> getTitleFields()
fields then bound fields to be used for title composition.
null is not permittedpublic String getTitle()
public Font getTitleFont()
protected Pair<String,Font> getTitlePair()
protected void updatePanelBorder(JComponent panel,
String title)
panel - The browse or query paneltitle - The titleprotected void updateBorders()
WidgetBorder border info returned from
the getBorder().
If the method is not called from EDT it will be forked into it.
public JComponent getBrowseModeComponent()
getBrowseModeComponent in interface IJCWidget.DesignerHandleprotected JPanel getBrowseModePanel()
protected JPanel getQueryModePanel()
|
com.im.ijc.widgets/1 5.9.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||