org.crosswire.common.swing.desktop
Class TDIViewLayout

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

public class TDIViewLayout
extends AbstractViewLayout

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

Author:
Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

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.AbstractViewLayout
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: AbstractViewLayout
Add a view to the set.

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

removeView

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

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

forceRemoveView

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

Overrides:
forceRemoveView in class AbstractViewLayout

updateTitle

public void updateTitle(Component component)
Description copied from class: AbstractViewLayout
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 AbstractViewLayout
Parameters:
component - the component whose title is to be used

getSelected

public Component getSelected()
Description copied from class: AbstractViewLayout
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 AbstractViewLayout

select

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

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

addPopup

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

Parameters:
popup -

Copyright ยจ 2003-2007