public abstract class IlvAbstractStaticViewContainer extends Object implements IlvViewContainer
IlvViewContainer
interface for static view containers.ACTIVE_VIEW_PROPERTY, APPLICATION_PROPERTY, CONFIGURATION_NAME_PROPERTY, CONTAINER_TEMPLATE_PROPERTY, DOCUMENT_PROPERTY, DOCUMENT_TEMPLATE_PROPERTY, DOCUMENT_VIEWS_PROPERTY, VISIBILITY_PROPERTY
Constructor and Description |
---|
IlvAbstractStaticViewContainer()
Constructs a new
IlvAbstractStaticViewContainer instance. |
IlvAbstractStaticViewContainer(IlvDocumentView view)
Constructs a new
IlvAbstractStaticViewContainer instance
that contains the specified document view. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Invoked when an action occurs.
|
abstract void |
activate()
Sets the container as active.
|
void |
addActionHandler(ActionHandler actionHandler)
Adds the specified
actionHandler to the list of action
handlers of the view container. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener that listens for changes to the properties of this
view container.
|
protected abstract IlvDocumentView[] |
findViews()
Invoked by the
getViews() method to retrieve the document views
contained by this view container. |
Object |
getProperty(String key)
Returns the property of this view container with the specified key.
|
IlvDocumentView[] |
getViews()
Returns the document views of this container that are provided with the
findViews() method. |
boolean |
isContainerVisible()
Determines whether this view container is visible.
|
boolean |
isProcessingAction(String command)
Determines whether the view container can perform the action
with the specified
command key in its
actionPerformed(java.awt.event.ActionEvent) method. |
boolean |
removeActionHandler(ActionHandler actionHandler)
Removes the specified
actionHandler from the list of action
handlers managed by this view container. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the specified listener from the list of
PropertyChange
listeners managed by this object. |
void |
setContainerVisible(boolean visible)
Shows or hides this view container depending on the value of the
visible parameter. |
Object |
setProperty(String key,
Object value)
Changes the value of one of the properties of this view container.
|
boolean |
updateAction(Action action)
Invoked by the application to update the state of the specified
action . |
public IlvAbstractStaticViewContainer()
IlvAbstractStaticViewContainer
instance.public IlvAbstractStaticViewContainer(IlvDocumentView view)
IlvAbstractStaticViewContainer
instance
that contains the specified document view. The method getViews()
returns an array of one element containing this document view and
the findViews()
is not called.view
- The document view owned by this view container.public IlvDocumentView[] getViews()
findViews()
method.getViews
in interface IlvViewContainer
protected abstract IlvDocumentView[] findViews()
getViews()
method to retrieve the document views
contained by this view container. This method is invoked only the first
time the getViews()
is invoked. The views returned by this method
are then stored and returned the next time the getViews()
method
is called.public abstract void activate()
activate
in interface IlvViewContainer
public boolean isContainerVisible()
false
.isContainerVisible
in interface IlvViewContainer
true
if the container is visible; false
otherwise.setContainerVisible(boolean)
public void setContainerVisible(boolean visible)
visible
parameter. The default implementation of this
method is empty.setContainerVisible
in interface IlvViewContainer
visible
- If true
the view container is shown; if
false
the view container is hidden.isContainerVisible()
public boolean updateAction(Action action)
action
.
addActionHandler(ilog.views.appframe.event.ActionHandler)
until one
action handler can update the action.updateAction
in interface ActionHandler
action
- The action to update.true
if one action handler can update the
specified action; false
otherwise.addActionHandler(ilog.views.appframe.event.ActionHandler)
public boolean isProcessingAction(String command)
command
key in its
actionPerformed(java.awt.event.ActionEvent)
method. By default, this method returns true
if one action handler added to the view container can process
this action; false
otherwise.isProcessingAction
in interface ActionHandler
command
- The command key of the action.true
if the action listener performs the specified
action; false
otherwise.addActionHandler(ilog.views.appframe.event.ActionHandler)
,
actionPerformed(java.awt.event.ActionEvent)
public void actionPerformed(ActionEvent e)
ActionListener.actionPerformed(java.awt.event.ActionEvent)
method is invoked; otherwise this method does nothing.actionPerformed
in interface ActionListener
addActionHandler(ilog.views.appframe.event.ActionHandler)
public void addActionHandler(ActionHandler actionHandler)
actionHandler
to the list of action
handlers of the view container.actionHandler
- The new action handler to add.removeActionHandler(ilog.views.appframe.event.ActionHandler)
public boolean removeActionHandler(ActionHandler actionHandler)
actionHandler
from the list of action
handlers managed by this view container.true
if the action handler was previously added;
false
otherwise.addActionHandler(ilog.views.appframe.event.ActionHandler)
public Object getProperty(String key)
getProperty
in interface IlvPropertyManager
key
- The non-null property key.null
if the specified property was not found.setProperty(java.lang.String, java.lang.Object)
public Object setProperty(String key, Object value)
PropertyChangeEvent
is sent to
the property change listeners.setProperty
in interface IlvPropertyManager
key
- The non-null property key.value
- An Object
value. If it is equal to
null
, the property with the specified key is removed.getProperty(java.lang.String)
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface IlvPropertyManager
listener
- The listener to addremovePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChange
listeners managed by this object.removePropertyChangeListener
in interface IlvPropertyManager
listener
- The listener to removeaddPropertyChangeListener(java.beans.PropertyChangeListener)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.