public final class HSAdapterDelegateComponent
extends java.lang.Object
HSAdapterDelegate. When properties
are delegated, meaning not stored directly in the Project or Workspace
hash structure, the component behaves as read-only and all keyboard
and mouse input to is sub-components is blocked.| Modifier and Type | Class and Description |
|---|---|
static class |
HSAdapterDelegateComponent.Scope
Describes the scope of property delegation, either Project or Workspace.
|
| Constructor and Description |
|---|
HSAdapterDelegateComponent(javax.swing.JComponent comp)
Constructs a HSAdapterDelegateComponent which can decorate the
supplied component as read-only if the properties edited by the
component are not stored in the Project or Workspace but rather
delegated to a
HSAdapterDelegate object. |
| Modifier and Type | Method and Description |
|---|---|
void |
configureComponent(java.lang.String propertyDataKey,
HSAdapterDelegateComponent.Scope scope,
HashStructureNode node)
Configures the component given in the construtor based on whether
the properties identified by
propertyDataKey are delegated
to a HSAdapterDelegate. |
javax.swing.JComponent |
getComponent()
Retrieves the component that handles delegated properties, making itself
read-only and blocking input as necessary.
|
static boolean |
propertiesAreDelegated(java.lang.String propertyDataKey,
HSAdapterDelegateComponent.Scope scope,
HashStructureNode node) |
public HSAdapterDelegateComponent(javax.swing.JComponent comp)
HSAdapterDelegate object.comp - the component to decorate as read-only if properties
are delegated to a HSAdapterDelegateconfigureComponent(java.lang.String, oracle.ide.model.panels.HSAdapterDelegateComponent.Scope, oracle.ide.model.HashStructureNode)public javax.swing.JComponent getComponent()
Note: do not add components directly to this component, instead add them to the blocked component given in the constructor.
public void configureComponent(java.lang.String propertyDataKey,
HSAdapterDelegateComponent.Scope scope,
HashStructureNode node)
propertyDataKey are delegated
to a HSAdapterDelegate. When properties are delegated, the
component is read-only, otherwise the component is read-write and
behaves normally.propertyDataKey - the key that identifies the hash structure
that stores a set of properties, or an individual property keyscope - denotes Project or Workspace scopenode - the Project or Workspace node whose properties are
being editedpublic static boolean propertiesAreDelegated(java.lang.String propertyDataKey,
HSAdapterDelegateComponent.Scope scope,
HashStructureNode node)