|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.factory.AbstractControlFactory
org.springframework.richclient.form.binding.support.AbstractBinding
org.springframework.richclient.form.binding.support.CustomBinding
org.springframework.richclient.form.binding.swing.editor.AbstractLookupBinding
public abstract class AbstractLookupBinding
Nested Class Summary | |
---|---|
protected static class |
AbstractLookupBinding.TabKeyListener
Helper class to build a KeyListener that reacts on tabs. |
Field Summary | |
---|---|
static int |
AUTOPOPUPDIALOG_ALWAYS
Always pop-up. |
static int |
AUTOPOPUPDIALOG_MULTIPLE_MATCH
Pop-up dataEditor when multiple matches are found. |
static int |
AUTOPOPUPDIALOG_NO_MATCH
Pop-up dataEditor when no match is found. |
static int |
AUTOPOPUPDIALOG_NO_UNIQUE_MATCH
Pop-up if no unique match is found. |
static int |
AUTOPOPUPDIALOG_UNIQUE_MATCH
Pop-up dataEditor when unique match is found. |
static String |
DEFAULT_SELECTDIALOG_COMMAND_ID
Default id to configure the command. |
static String |
DEFAULT_SELECTDIALOG_ID
Default id to configure the dialog. |
static String |
NO_INITIALIZE_DATA_EDITOR
Parameter used to pass to the dataEditorCommand in order to skip initialization of the dataEditor. |
static Boolean |
OFF
Standard off option to use with parameters. |
static Boolean |
ON
Standard on option to use with parameters. |
static String |
ON_ABOUT_TO_CHANGE
|
Fields inherited from class org.springframework.richclient.form.binding.support.AbstractBinding |
---|
fieldMetadata, formModel, formPropertyPath |
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
logger |
Constructor Summary | |
---|---|
AbstractLookupBinding(DefaultDataEditorWidget dataEditor,
FormModel formModel,
String formPropertyPath)
|
Method Summary | |
---|---|
protected ActionCommand |
createDataEditorCommand()
Create the dataEditorCommand. |
protected abstract Object |
createFilterFromString(String textFieldValue)
Create an empty referable that is used to pass onto the dataEditor search method and that is used to set onto the valueModel if this binding is set to not revert upon yielding a null search
result. |
protected FocusListener |
createFocusListener()
Create a focus listener to attach to the textComponent and dataEditorButton that will decide what happens with the changed value. |
protected JComponent |
createKeyComponent()
|
protected AbstractLookupBinding.TabKeyListener |
createKeyListener()
Create a keyListener that reacts on tabs. |
protected JTextField |
createTextComponent()
Deprecated. move implementation to createKeyComponent() when removing this method. |
protected JComponent |
doBindControl()
|
protected void |
enabledChanged()
Called when the enabled state of the bound property changes. |
protected boolean |
evaluateFocusLost(FocusEvent e)
|
protected int |
getAutoPopupDialog()
Returns the mask defining the behavior of the pop-up. |
protected DefaultDataEditorWidget |
getDataEditor()
Return the dataEditor used to select a referable. |
protected AbstractButton |
getDataEditorButton()
Get/create the button to open the dataEditor in selection mode |
protected ActionCommand |
getDataEditorCommand()
Return the dataEditorCommand. |
String |
getDataEditorViewCommandId()
Returns the id used to configure the viewCommand. |
Dimension |
getDialogSize()
|
Object |
getFilter()
|
protected JComponent |
getKeyComponent()
|
protected String |
getKeyComponentText()
Return the text that is shown on the keyComponent and that should be used to lookup the referable. |
abstract String |
getObjectLabel(Object o)
|
protected JTextComponent |
getOrCreateKeyTextComponent()
Deprecated. use getKeyComponent() instead or to access the text directly, use
getKeyComponentText() and setKeyComponentText(String) . |
protected Map<Object,Object> |
getParameters()
Returns the parameter map that is passed to the dataEditor command. |
protected String |
getSelectDialogCommandId()
Returns the id for the command that shows the dialog. |
protected String |
getSelectDialogId()
Returns the id for the TitledApplicationDialog that shows up when pressing the button. |
protected Object |
initializeDataEditor()
Initialize the dataEditor by passing the search referable as search parameter. |
boolean |
isEnableViewCommand()
Returns true if the viewCommand should be shown. |
boolean |
isLoadDetailedObject()
|
protected boolean |
onFinish()
When a value is selected, set it on the valueModel. |
protected void |
readOnlyChanged()
Called when the read only state of the bound property changes. |
protected boolean |
revertValueOnFocusLost()
Return true if the value should be reverted when focus is lost and no value is selected. |
void |
setAutoPopupdialog(int autoPopupDialog)
Set the mask defining the pop-up behavior. |
void |
setDataEditorViewCommandId(String dataEditorViewCommandId)
Set the id used to configure the viewCommand. |
void |
setEnableViewCommand(boolean enableViewCommand)
Enable the viewCommand that switches the view to the dataEditor of this referable. |
void |
setFilter(Object filter)
|
protected void |
setKeyComponentText(String text)
Set the text of the referable label on the key component (normally the textField). |
void |
setLoadDetailedObject(boolean loadDetailedObject)
|
void |
setRevertValueOnFocusLost(boolean revertValueOnFocusLost)
Set to true if the value should be reverted when focus is lost and no value is selected. |
void |
setSelectDialogCommandId(String selectDialogCommandId)
Set the id for the command that shows the dialog. |
void |
setSelectDialogId(String selectDialogId)
Set the id for the TitledApplicationDialog that shows up when pressing the button. |
protected void |
valueModelChanged(Object newValue)
Called when the underlying property's value model value changes. |
Methods inherited from class org.springframework.richclient.form.binding.support.CustomBinding |
---|
controlValueChanged, isReadOnly, setReadOnly |
Methods inherited from class org.springframework.richclient.form.binding.support.AbstractBinding |
---|
createControl, getFieldFace, getFormModel, getProperty, getPropertyType, getValue, getValueModel, isEnabled |
Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory |
---|
createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton |
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.richclient.form.binding.Binding |
---|
getControl |
Field Detail |
---|
public static final String ON_ABOUT_TO_CHANGE
public static final String NO_INITIALIZE_DATA_EDITOR
public static final int AUTOPOPUPDIALOG_UNIQUE_MATCH
public static final int AUTOPOPUPDIALOG_NO_MATCH
public static final int AUTOPOPUPDIALOG_MULTIPLE_MATCH
public static final int AUTOPOPUPDIALOG_ALWAYS
public static final int AUTOPOPUPDIALOG_NO_UNIQUE_MATCH
public static final Boolean ON
public static final Boolean OFF
public static final String DEFAULT_SELECTDIALOG_ID
public static final String DEFAULT_SELECTDIALOG_COMMAND_ID
Constructor Detail |
---|
public AbstractLookupBinding(DefaultDataEditorWidget dataEditor, FormModel formModel, String formPropertyPath)
Method Detail |
---|
protected Map<Object,Object> getParameters()
protected String getSelectDialogId()
public void setSelectDialogId(String selectDialogId)
protected String getSelectDialogCommandId()
public void setSelectDialogCommandId(String selectDialogCommandId)
protected int getAutoPopupDialog()
public void setAutoPopupdialog(int autoPopupDialog)
AUTOPOPUPDIALOG_ALWAYS
,
AUTOPOPUPDIALOG_UNIQUE_MATCH
,
AUTOPOPUPDIALOG_MULTIPLE_MATCH
,
AUTOPOPUPDIALOG_NO_MATCH
,
AUTOPOPUPDIALOG_NO_UNIQUE_MATCH
protected boolean revertValueOnFocusLost()
true
if the value should be reverted when focus is lost and no value is selected.
public void setRevertValueOnFocusLost(boolean revertValueOnFocusLost)
true
if the value should be reverted when focus is lost and no value is selected.
protected void valueModelChanged(Object newValue)
valueModelChanged
in class CustomBinding
public abstract String getObjectLabel(Object o)
protected JComponent doBindControl()
doBindControl
in class AbstractBinding
@Deprecated protected JTextComponent getOrCreateKeyTextComponent()
getKeyComponent()
instead or to access the text directly, use
getKeyComponentText()
and setKeyComponentText(String)
.
protected JComponent getKeyComponent()
protected JComponent createKeyComponent()
@Deprecated protected JTextField createTextComponent()
createKeyComponent()
when removing this method.
protected String getKeyComponentText()
protected void setKeyComponentText(String text)
protected AbstractLookupBinding.TabKeyListener createKeyListener()
getAutoPopupDialog()
mask.
protected FocusListener createFocusListener()
protected boolean evaluateFocusLost(FocusEvent e)
protected void readOnlyChanged()
AbstractBinding
readOnlyChanged
in class AbstractBinding
FormPropertyState
protected void enabledChanged()
AbstractBinding
enabledChanged
in class AbstractBinding
FormPropertyState
protected Object initializeDataEditor()
null
if nothing was found.protected abstract Object createFilterFromString(String textFieldValue)
null
search
result.
textFieldValue
- the value of the textComponent.
protected AbstractButton getDataEditorButton()
protected final ActionCommand getDataEditorCommand()
protected ActionCommand createDataEditorCommand()
protected DefaultDataEditorWidget getDataEditor()
protected boolean onFinish()
true
if successful.public void setDataEditorViewCommandId(String dataEditorViewCommandId)
public String getDataEditorViewCommandId()
public void setEnableViewCommand(boolean enableViewCommand)
public boolean isEnableViewCommand()
true
if the viewCommand should be shown. Default value is false
.
public boolean isLoadDetailedObject()
public void setLoadDetailedObject(boolean loadDetailedObject)
public void setFilter(Object filter)
public Object getFilter()
public Dimension getDialogSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |