pagelayout
Class TabbedPaneCell

java.lang.Object
  extended by pagelayout.Cell
      extended by pagelayout.TabbedPaneCell

public class TabbedPaneCell
extends Cell

TabbedPaneCell encloses a JTabbedPane.


Nested Class Summary
static class TabbedPaneCell.CellManagedPanel
           
 
Nested classes/interfaces inherited from class pagelayout.Cell
Cell.Constraint
 
Field Summary
 
Fields inherited from class pagelayout.Cell
BASELINE, BOTTOM, boundSpring, CENTER, constraint, filledSizeX, filledSizeY, fixMaxSize, FOUND_NOTREPLACED, FOUND_REPLACED, halign, JUSTIFIED, LEFT, links, MAX, NEWROW, NO_ALIGNMENT, NOT_FOUND, RIGHT, SKIP, TOP, valign
 
Constructor Summary
TabbedPaneCell(javax.swing.JTabbedPane container)
           
 
Method Summary
 void add(java.lang.String name, Cell p)
           
 void add(java.lang.String name, java.awt.Component p)
           
 void addComponentsToContainer(java.awt.Container parent)
          This method may be over-ridden to add components to the container in all the subclasses whose instances may contain components.
 BoundSpring computeBoundSpring()
          Should be implemented by all the subclasses to compute the two-dimensional spring associated with the cell.
 Cell duplicate(ComponentDuplicator c)
           
 Cell getChildAt(int i)
          Should be over-ridden by sub-classes that contain child-cells to return the child associated with the given index, or null if the index is out of bounds.
 java.awt.Component getComponent()
          If this cell is a component cell, this method returns the enclosed component.
 Cell getTopLevelCell(java.awt.Component c)
           
 boolean isComponentCell()
          Returns true if this cell encloses a component.
 boolean isTabCell(int ind)
           
 int numberOfChildren()
          Should be over-ridden by sub-classes that contain child-cells to return the number of children that the object has.
 java.awt.Container removeAllComponents(java.awt.Container parent)
          Recursively traverses the tree of cells formed with this cell as the root to remove all the cells that contain only components.
protected  void setBounds(int x, int y, int width, int height)
          This method does nothing here, but all the subclasses must over-ride it to layout, within the specified rectangle of the container, the components which they or their children enclose.
 void xmlserialize(XMLPrintStream out, ComponentXMLSerializer c)
           
 
Methods inherited from class pagelayout.Cell
addArgs, alignBaseline, alignBaseline, checkArgs, createLayout, dupConstraint, getAlignment, getBaseline, getBoundSpring, getCellByName, getComponentCell, getComponentCell, getConstraint, getContainer, getDim, getFilledSizeX, getFilledSizeY, getName, getParent, getRootCell, getSize, invalidate, isCell, isCellOrComponent, isFixedHeight, isFixedSize, isFixedWidth, layout, linkHeight, linkHeight, linkHeight, linkToContainerHeight, linkToContainerWidth, linkWidth, linkWidth, linkWidth, removeComponent, replaceCell, replaceChild, setAlignment, setBounds, setComponentGaps, setDim, setFixedHeight, setFixedHeight, setFixedHeight, setFixedHeight, setFixedHeight, setFixedSize, setFixedSize, setFixedSize, setFixedWidth, setFixedWidth, setFixedWidth, setFixedWidth, setFixedWidth, setName, setParent, setSize, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabbedPaneCell

public TabbedPaneCell(javax.swing.JTabbedPane container)
Method Detail

add

public void add(java.lang.String name,
                java.awt.Component p)

add

public void add(java.lang.String name,
                Cell p)

computeBoundSpring

public BoundSpring computeBoundSpring()
Description copied from class: Cell
Should be implemented by all the subclasses to compute the two-dimensional spring associated with the cell.

Specified by:
computeBoundSpring in class Cell
Returns:
The computed two-dimensional spring.

addComponentsToContainer

public void addComponentsToContainer(java.awt.Container parent)
Description copied from class: Cell
This method may be over-ridden to add components to the container in all the subclasses whose instances may contain components. This method is called when the PageLayout is first constructed, but may also be called whenever a new component is added via the replaceCell method of this class. Even in the later case, there is no need to call this method directly.

Overrides:
addComponentsToContainer in class Cell
Parameters:
parent - the java.awt.Container object to which the components should be added.

setBounds

protected void setBounds(int x,
                         int y,
                         int width,
                         int height)
Description copied from class: Cell
This method does nothing here, but all the subclasses must over-ride it to layout, within the specified rectangle of the container, the components which they or their children enclose. This method is called every time the container calls the layout manager to layout the components within it.

Overrides:
setBounds in class Cell
Parameters:
x - the x-coordinate of the top left of the rectangle.
y - the y-coordinate of the top left of the rectangle.
width - the width of the rectangle.
height - the height of the rectangle.

removeAllComponents

public java.awt.Container removeAllComponents(java.awt.Container parent)
Description copied from class: Cell
Recursively traverses the tree of cells formed with this cell as the root to remove all the cells that contain only components.

Overrides:
removeAllComponents in class Cell
Parameters:
parent - the container in which the components are placed. If it is null, the parent is retrieved from the first component that is found in the tree.
Returns:
The parent of the removed components.

isComponentCell

public boolean isComponentCell()
Description copied from class: Cell
Returns true if this cell encloses a component.

Overrides:
isComponentCell in class Cell
Returns:
true if this cell encloses a component, false otherwise.

getComponent

public java.awt.Component getComponent()
Description copied from class: Cell
If this cell is a component cell, this method returns the enclosed component. Otherwise null is returned.

Overrides:
getComponent in class Cell
Returns:
The component enclosed within this cell, null if none exists.

duplicate

public Cell duplicate(ComponentDuplicator c)
Specified by:
duplicate in class Cell

isTabCell

public boolean isTabCell(int ind)

xmlserialize

public void xmlserialize(XMLPrintStream out,
                         ComponentXMLSerializer c)
Specified by:
xmlserialize in class Cell

numberOfChildren

public int numberOfChildren()
Description copied from class: Cell
Should be over-ridden by sub-classes that contain child-cells to return the number of children that the object has.

Overrides:
numberOfChildren in class Cell
Returns:
The number of child cells that this cell has.

getChildAt

public Cell getChildAt(int i)
Description copied from class: Cell
Should be over-ridden by sub-classes that contain child-cells to return the child associated with the given index, or null if the index is out of bounds.

Overrides:
getChildAt in class Cell
Parameters:
i - the index of the cell that is needed.
Returns:
The cell at the given index if it exists or null otherwise.

getTopLevelCell

public Cell getTopLevelCell(java.awt.Component c)