com.borland.primetime.ide
Class ContentManager

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.borland.primetime.ide.ContentManager
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public abstract class ContentManager
extends javax.swing.JPanel

ContentManager (one instance per Browser window) manages the display of open files in the Content Pane by providing one tab per file, where each tab represents a ContentView that in turn uses one or more NodeViewers separated by tabs to display the file content.

Access to the ContentManager is controlled via the Browser hosting the ContentManager - thus no public methods are available on the ContentManager except for registration of items for the popup menu.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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  Browser browser
          Reference to the Browser which created this ContentManager instance.
protected  boolean closingNodeArray
          Internal flag used to differeniate between doing a closeNode() as part of a closeNodes() or not.
protected  java.util.ArrayList contentViews
          List of all ContentView instances have created in the same order as the displayed tabs.
static ActionGroup GROUP_NodeContext
          Root ActionGroup for ContentManager popup.
static ActionGroup GROUP_NodeContext1
          First ActionGroup for ContentManager popup with Save/SaveAs/Rename.
static ActionGroup GROUP_NodeContext2
          Second ActionGroup for ContentManager popup with Close/CloseAll/Revert.
protected  java.awt.Dimension minSize
          Minimum size of the ContentManager.
protected  ActionPopupMenu pop
          Context popup for ContentManager.
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Method Summary
protected  int getContentViewIndex(Node node)
          Returns the ContentView index for the given Node if any.
 java.awt.Dimension getMinimumSize()
          Override to ensure a minimum size of 100x100.
abstract  void nextOpenNode(boolean requestFocus)
          Relative to the currently active Node, this routine makes the next Node in the current ContentManager active.
 void nodeChanged(Node node)
          This method is called when given Node has been altered.
abstract  void previousOpenNode(boolean requestFocus)
          Relative to the currently active Node, this routine makes the prior Node in the current ContentManager active.
static void registerContextActionProvider(ContextActionProvider provider)
          OpenTools registration for an interface used to provide an Action to appear on the ContentManager popup menu.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, 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, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, 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

closingNodeArray

protected boolean closingNodeArray
Internal flag used to differeniate between doing a closeNode() as part of a closeNodes() or not. This is a performance enhancement to prevent the choosing the following node to be automatically opened until all nodes in the array have been closed.

minSize

protected java.awt.Dimension minSize
Minimum size of the ContentManager.

browser

protected Browser browser
Reference to the Browser which created this ContentManager instance.

contentViews

protected java.util.ArrayList contentViews
List of all ContentView instances have created in the same order as the displayed tabs.

GROUP_NodeContext

public static ActionGroup GROUP_NodeContext
Root ActionGroup for ContentManager popup.

GROUP_NodeContext1

public static ActionGroup GROUP_NodeContext1
First ActionGroup for ContentManager popup with Save/SaveAs/Rename.

GROUP_NodeContext2

public static ActionGroup GROUP_NodeContext2
Second ActionGroup for ContentManager popup with Close/CloseAll/Revert.

pop

protected ActionPopupMenu pop
Context popup for ContentManager.
Method Detail

registerContextActionProvider

public static void registerContextActionProvider(ContextActionProvider provider)
OpenTools registration for an interface used to provide an Action to appear on the ContentManager popup menu.
Parameters:
provider - An interface which can provide the popup menu Action.

nodeChanged

public void nodeChanged(Node node)
This method is called when given Node has been altered. Typically this indicates that the node has been renamed or moved in the project hierarchy. This is an opporitunity for the NodeViewer to update anything that displays the Node name, description, etc.
Parameters:
node - Node which has changed.

getContentViewIndex

protected int getContentViewIndex(Node node)
Returns the ContentView index for the given Node if any.
Parameters:
node - Node to be mapped to a ContentView index
Returns:
The ContentView index for this Node or -1.

nextOpenNode

public abstract void nextOpenNode(boolean requestFocus)
                           throws java.lang.Exception
Relative to the currently active Node, this routine makes the next Node in the current ContentManager active.
Parameters:
requestFocus - If true, then new active node is given the focus.

previousOpenNode

public abstract void previousOpenNode(boolean requestFocus)
                               throws java.lang.Exception
Relative to the currently active Node, this routine makes the prior Node in the current ContentManager active.
Parameters:
requestFocus - If true, then new active node is given the focus.

getMinimumSize

public java.awt.Dimension getMinimumSize()
Override to ensure a minimum size of 100x100.
Overrides:
getMinimumSize in class javax.swing.JComponent
Returns:
Returns the minimum size.