public class DBObjectIDComponentWrapper
extends oracle.ideimpl.db.components.AsynchronousComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
The default behaviour uses the metadata for the property, specifically the @References annotation, to determine the right chooser configuration. This class can be subclassed to provide custom logic for properties where required.
Constructor and Description |
---|
DBObjectIDComponentWrapper()
Constructs a new wrapper for editing a DBObjectID.
|
Modifier and Type | Method and Description |
---|---|
protected DBObjectChooser |
createObjectChooser(DBObjectChooser parent,
java.lang.String... types)
Allow subclasses to override the construction of the DBObjectChooser
|
protected void |
gainingFocus()
Called when the wrapped component gains focus.
|
protected Schema |
getDefaultSchema()
Gets the default schema to use in all the choosers.
|
java.awt.Component[] |
getFocusComponents()
The UI components whose focus events the component wrapper should listen
to (and inform the owning panel of).
|
protected DBObjectChooser |
getObjectChooser()
Returns the DBObjectChooser used to select the referenced object.
|
protected DBObjectChooser |
getParentChooser()
Returns the DBObjectChooser used to select the parent of the referenced object.
|
java.lang.Object |
getPropertyValue()
Gets the value of the property as currently set in the UI Component
e.g.
|
protected DBObjectChooser |
getSchemaChooser()
Returns the DBObjectChooser used to select the Schema of the referenced object.
|
protected void |
initialiseComponent()
If any setup of the Component is needed after the provider/object are
known override this method and implement there.
|
protected void |
initialiseComponentListener()
Initialises a listener against the underlying Component that will
call fireChangeEvent whenever the value in the UI is changed by the
user.
|
protected void |
initialiseNewObject(SystemObject obj)
If the add button is included, this method will be called on any new
object prior to it displaying in the create dialog.
|
protected boolean |
isEditable()
Tests whether the chooser(s) should be editable.
|
protected boolean |
isFixedSchema()
Tests whether the schema is fixed, and therefore no schema combo should
be displayed regardless of the property information.
|
protected boolean |
isIncludeContextObject()
Tests whether the chooser should include the context object we are
editing (assuming it matches the types listed by the chooser).
|
protected boolean |
isShowAddButton()
Tests whether the chooser should include an "add" button for creating
(and selecting) new objects.
|
protected boolean |
isShowDBLinkButton()
Tests whether the schema chooser (if there is one) should include the
dblink button for selecting via a database link.
|
protected boolean |
isShowEditButton()
Tests whether the chooser should include an "edit" button for editing
the currently selected object
|
protected void |
losingFocus()
Called when the wrapped component loses focus.
|
protected void |
setActiveImpl(boolean active)
Called when a ComponentWrapper is activated/deactivated - typically onEntry/onExit of the
owning panel.
|
void |
setPropertyValue(java.lang.Object value)
Sets the value of the property displayed in the UI.
|
protected void |
setupObjectChooser(DBObjectChooser chooser)
Perform any addition configuration of the object chooser before it has
the DBObjectProvider and set (i.e.
|
protected void |
setupParentChooser(DBObjectChooser chooser)
Perform any addition configuration of the parent object chooser before
it has the DBObjectProvider set (i.e.
|
void |
setValidationStatus(java.util.Collection<ValidationException> ves,
oracle.ideimpl.db.validate.DBValidationHandler handler)
Sets the validation status of the wrapped property value.
|
cancelCurrentWrapper, cancelUpdates, commitCurrentWrapper, getDefaultFocusComponent, isDirty, markDirty, processUpdate, writeUpdates
addListener, addVetoListener, checkPropertyIsSupported, createComponentForLayout, fireChangeEvent, getActiveComponent, getCellEditorComponent, getComponent, getComponentContext, getDefaultValidationComponent, getExistingPropertyValue, getLabel, getLogger, getOriginalObject, getPropertyDisplayName, getPropertyHelper, getPropertyName, getProvider, getUpdatedObject, initialise, isActive, isSupported, isVolatile, processComponent, refreshObject, removeListener, removeVetoListener, resetPropertyValue, setActive, setEnabled, setPropertyDisplayName, setReadOnly, setUIReadOnly, setVisible
public DBObjectIDComponentWrapper()
public java.lang.Object getPropertyValue()
ComponentWrapper
getPropertyValue
in class ComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
public void setValidationStatus(java.util.Collection<ValidationException> ves, oracle.ideimpl.db.validate.DBValidationHandler handler)
ComponentWrapper
By default this applys the status highlight to the default validation component.
setValidationStatus
in class ComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
ves
- what is wrong with the value (can be null or empty to
signify that the value is valid).handler
- the calling handler.ComponentWrapper.getDefaultValidationComponent()
public void setPropertyValue(java.lang.Object value)
ComponentWrapper
This does not update the DBObject model, and should only need to be called outside of this class if the DBObject model has been manually updated.
setPropertyValue
in class ComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
ComponentWrapper.resetPropertyValue(Object)
protected void gainingFocus()
oracle.ideimpl.db.components.AsynchronousComponentWrapper
gainingFocus
in class oracle.ideimpl.db.components.AsynchronousComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
protected void losingFocus()
oracle.ideimpl.db.components.AsynchronousComponentWrapper
losingFocus
in class oracle.ideimpl.db.components.AsynchronousComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
protected void initialiseComponent()
ComponentWrapper
initialiseComponent
in class ComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
protected void initialiseComponentListener()
oracle.ideimpl.db.components.AsynchronousComponentWrapper
initialiseComponentListener
in class oracle.ideimpl.db.components.AsynchronousComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
protected void setActiveImpl(boolean active)
ComponentWrapper
setActiveImpl
in class ComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
public java.awt.Component[] getFocusComponents()
oracle.ideimpl.db.components.AsynchronousComponentWrapper
getFocusComponents
in class oracle.ideimpl.db.components.AsynchronousComponentWrapper<oracle.ideimpl.db.controls.IdPanel>
protected void setupObjectChooser(DBObjectChooser chooser)
chooser
- the "object" chooser for this wrapper.protected void setupParentChooser(DBObjectChooser chooser)
chooser
- the "parent" chooser for this wrapper.protected boolean isEditable()
protected boolean isIncludeContextObject()
protected boolean isFixedSchema()
protected Schema getDefaultSchema()
protected boolean isShowAddButton()
protected boolean isShowEditButton()
protected boolean isShowDBLinkButton()
protected void initialiseNewObject(SystemObject obj)
obj
- the new object about to be createdprotected DBObjectChooser createObjectChooser(DBObjectChooser parent, java.lang.String... types)
parent
- types
- protected final DBObjectChooser getSchemaChooser()
protected final DBObjectChooser getParentChooser()
protected final DBObjectChooser getObjectChooser()