JavaView® v2.00.008

jv.objectGui
Class PsTabPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--jv.object.PsPanel
                          |
                          +--jv.objectGui.PsTabPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, PsUpdateIf, java.io.Serializable

public class PsTabPanel
extends PsPanel

Panel with header of tabs and a body panel with cardlayout.

Usage:

	   tabPanel = new PsTabPanel();
	   add(tabPanel); // add tabbed panel like any other panel
	   tabPanel.addPanel("Domain", m_domain.getInfoPanel());
	   tabPanel.addPanel("Surface", m_function.getInfoPanel());
	   tabPanel.setVisible("Surface"); // select initially active panel
	   tabPanel.validate();			// layout panel again
 

Use the following call to reset the tabbed panel, i.e. remove all panels.
	   tabPanel.init();
    // add some new stuff to panel
	   tabPanel.validate();			// layout panel again
 
Panels added to PsTabPanel must be instance of PsPanel to ensure an update() method to be called whenever the panel becomes visible.

Version:
11.10.00, 2.30 revised (ep) Remove tab from header when panel is removed from tabpanel.
15.09.99, 2.20 revised (kp) Inform each panel when it becomes visible.
07.08.99, 2.10 revised (kp) Conversion to AWT 1.1
04.07.99, 2.00 revised (kp) Completely revised using old class PsTabs.
00.00.98, 1.00 created (kp)
Author:
Konrad Polthier
See Also:
Serialized Form

Inner classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  java.awt.CardLayout m_cardLayout
           
protected  java.awt.Panel m_cardPanel
           
protected  java.util.Hashtable m_tabHash
           
protected  jv.objectGui.PsTabsHeader m_tabHeader
           
 
Fields inherited from class jv.object.PsPanel
BORDER_GROOVE, BORDER_LINE, BORDER_NONE, BORDER_SUNK, m_borderType, m_bOutOfDate, m_image, m_insetSize, m_language, m_lTitle, m_parent
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PsTabPanel()
           
 
Method Summary
 void addPanel(java.lang.String name, PsPanel panel)
           
 java.lang.String getCurrentPanel()
           
 PsPanel getPanel(java.lang.String name)
           
 boolean hasPanel(PsPanel panel)
           
 boolean hasPanel(java.lang.String name)
           
 void init()
           
 void removePanel(java.lang.String name)
           
 void setVisible(java.lang.String name)
          Switch to panel with given name.
protected  void showFromHeader(java.lang.String name)
          Switch panel after user has clicked on a tab.
 void validate()
          Validate card panel and show named panel.
 
Methods inherited from class jv.object.PsPanel
addLabelComponent, addLine, addSubTitle, addTextField, addTitle, drawBorder, drawBorder, drawText, getFather, getInsets, getLanguage, getTitle, hasTitle, instanceOf, paint, setBorderType, setImage, setInsetSize, setOutOfDate, setParent, setTitle, setVisible, update, update
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.object.PsUpdateIf
getName
 

Field Detail

m_cardLayout

protected java.awt.CardLayout m_cardLayout

m_cardPanel

protected java.awt.Panel m_cardPanel

m_tabHeader

protected jv.objectGui.PsTabsHeader m_tabHeader

m_tabHash

protected java.util.Hashtable m_tabHash
Constructor Detail

PsTabPanel

public PsTabPanel()
Method Detail

init

public void init()
Overrides:
init in class PsPanel

addPanel

public void addPanel(java.lang.String name,
                     PsPanel panel)

getCurrentPanel

public java.lang.String getCurrentPanel()

getPanel

public PsPanel getPanel(java.lang.String name)

hasPanel

public boolean hasPanel(java.lang.String name)

hasPanel

public boolean hasPanel(PsPanel panel)

validate

public void validate()
Validate card panel and show named panel. Must be called after a panel is replaced.
Overrides:
validate in class java.awt.Container

removePanel

public void removePanel(java.lang.String name)

setVisible

public void setVisible(java.lang.String name)
Switch to panel with given name.

showFromHeader

protected void showFromHeader(java.lang.String name)
Switch panel after user has clicked on a tab.

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.