IFrameView Interface
- public interface IFrameView
Implement this interface, or derive from JComponent for all classes
specified in the 'class' attribute of a <frame-view> tag in your
extension.xml.
IFrameView's benefits over using a simple JComponent are, that it can
provide a 'Component' other than itself, for cases where component construction
is more complex, and it can specify the view's 'availability' dynamically.
public Component |
-
getView (String id)
- Gets the view component associated with this IFrameView.
|
public boolean |
-
isAvailable ()
- Used by the layout manager to determine if a view is 'available'. an
unavailable view does not show up in the UI at all (menus, and layout),
but if the user had it open the last time the view was available, then
it will return to the layout when it becomes available again.
|
getView(String) Method
public Component
getView(String
id)
Gets the view component associated with this IFrameView. frequently
this interface is simply implemented on the component itself, and the
'this' pointer is returned.
The 'id' attribute from the view-frame declaration is passed in, or null
if the frame-view tag had no id attribute. this allows multiple components
to share the same implementation class, but display distinctly
(e.g. output windows).
isAvailable() Method
public boolean isAvailable()
Used by the layout manager to determine if a view is 'available'. an
unavailable view does not show up in the UI at all (menus, and layout),
but if the user had it open the last time the view was available, then
it will return to the layout when it becomes available again.
This function will only get called, if 'askavailable="true"' is specified
on the <frame-view> tag in extension.xml.
A view with 'askavailable="true"' will be created at start-up if it
may be visible, in order that the 'isAvailable()' function may be called.
View availability is only checked on document, view, and layout switches
to cause it to be checked dynamically, call 'FrameSvc.get().recalcLayout()'.
In many cases the 'scope' attribute on the <frame-view> tag will be
sufficient for controling the 'availability'. Specifying a
document class or a view class in the scope attribute is equivalent
to returning 'false' from isAvailable() any time the document or
view type is not active. Also a scoped view, will not be created
until it is in scope.