org.bs.mdi
Interface DocumentWindow

All Superinterfaces:
Window
All Known Subinterfaces:
SwingDocumentWindow
All Known Implementing Classes:
TabDocumentWindow, TraditionalDocumentWindow

public interface DocumentWindow
extends Window

An interface for MDI subwindows which display the document's view to the user.


Method Summary
 boolean close()
          Try to close the window.
 Document getDocument()
          Returns the document which this view is associated with.
 RootView getView()
          Returns the window which this view is assigned to.
 void setEnabled(boolean enabled)
          Sets the enabled status of this window.
 void setView(RootView view)
          Assigns the given view to this window.
 void setVisible(boolean visible)
          Sets the visible status of this view.
 void toFront()
          Brings this window to the front and tries to make it the selected (=active) window.
 
Methods inherited from interface org.bs.mdi.Window
getTitle, hide, repaint, setTitle, show
 

Method Detail

toFront

public void toFront()
Brings this window to the front and tries to make it the selected (=active) window.


setEnabled

public void setEnabled(boolean enabled)
Sets the enabled status of this window. If a window is not enabled, it cannot process user input.

Parameters:
enabled - the new enabled status

setVisible

public void setVisible(boolean visible)
Sets the visible status of this view.

Parameters:
visible - true if this window should be visible, false otherwise

close

public boolean close()
Try to close the window. This function is also responsible for displaying warning messages asking the user if he really wants to close this window and lose the associated data. This means that this method does not necessarily have to succeed; this is the case if the user changes his mind and chooses not to close the window.

Specified by:
close in interface Window
Returns:
true if the window was successfully closed, false otherwise

getDocument

public Document getDocument()
Returns the document which this view is associated with. This is usually just a convenience method for calling getView().getDocument.

Returns:
the document

getView

public RootView getView()
Returns the window which this view is assigned to.

Returns:
the window

setView

public void setView(RootView view)
Assigns the given view to this window. The view will be displayed in this window.

Parameters:
view - the view