org.crosswire.common.swing.desktop
Class TDIViewLayout

java.lang.Object
  extended by org.crosswire.common.swing.desktop.ViewLayout
      extended by org.crosswire.common.swing.desktop.TDIViewLayout
All Implemented Interfaces:
Viewable

public class TDIViewLayout
extends ViewLayout

TDI (Tabbed Document Interface) manager of how we layout views as tabs.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: TDIViewLayout.java,v 1.2 2004/09/21 17:45:47 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
Licence

Field Summary
private  JTabbedPane tabs
          The tabbed view pane
 
Constructor Summary
TDIViewLayout()
          Build a TDI layout
 
Method Summary
 void addPopup(JPopupMenu popup)
          Bind a popup to the tabbed page
 void addView(Component component)
          Add a view to the set.
protected  void forceRemoveView(Component component)
          Unconditionally remove a view from the set.
 Component getSelected()
          Returns the top view.
 void removeView(Component component)
          Remove a view from the set.
 void select(Component component)
          Find the view and select it.
 void updateTitle(Component component)
          Update the title of the view.
 
Methods inherited from class org.crosswire.common.swing.desktop.ViewLayout
addViewEventListener, closeAll, closeOthers, fireViewRemoved, getConstraint, getPanel, getTitle, getView, getViewCount, getViews, iterator, moveTo, removeViewEventListener, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tabs

private JTabbedPane tabs
The tabbed view pane

Constructor Detail

TDIViewLayout

public TDIViewLayout()
Build a TDI layout

Method Detail

addView

public void addView(Component component)
Description copied from class: ViewLayout
Add a view to the set.

Specified by:
addView in interface Viewable
Overrides:
addView in class ViewLayout

removeView

public void removeView(Component component)
Description copied from class: ViewLayout
Remove a view from the set.

Specified by:
removeView in interface Viewable
Overrides:
removeView in class ViewLayout

forceRemoveView

protected void forceRemoveView(Component component)
Description copied from class: ViewLayout
Unconditionally remove a view from the set.

Overrides:
forceRemoveView in class ViewLayout

updateTitle

public void updateTitle(Component component)
Description copied from class: ViewLayout
Update the title of the view. If the component does not implement Titleable, then a generated title will be used.

Specified by:
updateTitle in interface Viewable
Specified by:
updateTitle in class ViewLayout
Parameters:
component - the component whose title is to be used

getSelected

public Component getSelected()
Description copied from class: ViewLayout
Returns the top view. If no view is the top, it returns the first one added.

Specified by:
getSelected in interface Viewable
Specified by:
getSelected in class ViewLayout

select

public void select(Component component)
Description copied from class: ViewLayout
Find the view and select it.

Specified by:
select in interface Viewable
Specified by:
select in class ViewLayout

addPopup

public void addPopup(JPopupMenu popup)
Bind a popup to the tabbed page

Parameters:
popup -

Copyright ? 2003-2004