Synergy Home Page

au.edu.swin.synergy.plugin.mod13
Class BPaneManager

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--au.edu.swin.synergy.plugin.mod13.BPaneManager

public class BPaneManager
extends JPanel

The BPaneManager allows the addition of many components to the single component and divides up the screen space using tabbed panes to separate each component.

Author:
Tristan Austin Please complete these missing tags
Copyright Belongs To:
 
See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static int kTabBottom
          The tabs go at the bottom
static int kTabLeft
          The tabs go at the left
static int kTabRight
          The tabs go at the right
static int kTabTop
          The tabs go at the top
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
BPaneManager()
          This is the default constructor.
BPaneManager(int tabPlacement)
          The tab placement for the tabbed pane is specified by tabPlacement.
 
Method Summary
 void add(Component component, Object constraints, boolean useScrollPane)
          This version of add will allow the caller to specify whether they want their component placed on a scroll pane or not.
protected  void addImpl(Component comp, Object constraints, int index)
          This will take whatever components are added and add them to the tabbed pane as a new tab.
protected  void doDialect()
          This will run through all the tabs on the tabbed pane and conver their titles to the value required for the current locale.
 JComponent getComponentCalled(String tabTitle)
          Gets the component with the given name
 int getDynamicCount()
          This will return the number of components currently being displayed on this dynamic pane.
 void removeComponent(Component targetComponent)
          This will remove the given component from the tabbed pane
 void selectComponent(Component targetComponent)
          This will select the given component on the tabbed pane
 boolean selectComponentCalled(String tabTitle)
          This will return the tab with the given title
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, 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
 

Field Detail

kTabTop

public static final int kTabTop
The tabs go at the top

kTabBottom

public static final int kTabBottom
The tabs go at the bottom

kTabLeft

public static final int kTabLeft
The tabs go at the left

kTabRight

public static final int kTabRight
The tabs go at the right
Constructor Detail

BPaneManager

public BPaneManager()
This is the default constructor. The BPaneManager defaults to having a horizontal split it also sets the layout to the borderlayout. Please complete the missing tags for BPaneManager
Parameters:
-  

BPaneManager

public BPaneManager(int tabPlacement)
The tab placement for the tabbed pane is specified by tabPlacement.
Parameters:
tabPlacement - Acceptable values include: JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, JTabbedPane.RIGHT Please complete the missing tags for BPaneManager
Method Detail

doDialect

protected void doDialect()
This will run through all the tabs on the tabbed pane and conver their titles to the value required for the current locale.

removeComponent

public void removeComponent(Component targetComponent)
This will remove the given component from the tabbed pane
Parameters:
targetComponent - The component to remove Please complete the missing tags for removeComponent
Returns:
 
Pre Condition:
 
Post Condition:
 

selectComponentCalled

public boolean selectComponentCalled(String tabTitle)
This will return the tab with the given title
Parameters:
tabTitle - The title of the tab to find
Returns:
The component with the tab title as supplied, null if not found

getComponentCalled

public JComponent getComponentCalled(String tabTitle)
Gets the component with the given name
Parameters:
tabTitle - The name of the tabbed panel to get

selectComponent

public void selectComponent(Component targetComponent)
This will select the given component on the tabbed pane
Parameters:
targetComponent - The component to select

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
This will take whatever components are added and add them to the tabbed pane as a new tab. The constraints provided should contain the name of the tab.

This will always place the component on a scroll pane.

Parameters:
comp - The new item to put on the tab
constraints - The name of the tab
index - The index to put it at
Overrides:
addImpl in class Container

add

public void add(Component component,
                Object constraints,
                boolean useScrollPane)
This version of add will allow the caller to specify whether they want their component placed on a scroll pane or not.
Parameters:
component - The component to add
constraints - The tab title of the component
useScrollPane - True to place the component on a scroll pane, false to not

getDynamicCount

public int getDynamicCount()
This will return the number of components currently being displayed on this dynamic pane.
Returns:
The number of components

Synergy Home Page