站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

ExplorerPanel (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.explorer
Class ExplorerPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byorg.openide.windows.TopComponent
                  extended byorg.openide.explorer.ExplorerPanel
All Implemented Interfaces:
Accessible, ExplorerManager.Provider, Externalizable, HelpCtx.Provider, ImageObserver, Lookup.Provider, MenuContainer, Serializable

Deprecated. Use ExplorerUtils.actionCopy(org.openide.explorer.ExplorerManager), etc, see ExplorerUtils javadoc for details

public class ExplorerPanel
extends TopComponent
implements ExplorerManager.Provider

Simple top component capable of displaying an Explorer. Holds one instance of ExplorerManager and implements ExplorerManager.Provider to allow child components to share the same explorer manager.

Uses BorderLayout by default. Pays attention to the selected nodes and explored context as indicated by the manager. Cut/copy/paste actions are sensitive to the activation state of the component.

It is up to you to add a view and other UI apparatus to the panel.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.openide.windows.TopComponent
TopComponent.Cloneable, TopComponent.NodeName, TopComponent.Registry
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class org.openide.windows.TopComponent
CLOSE_EACH, CLOSE_LAST, PERSISTENCE_ALWAYS, PERSISTENCE_NEVER, PERSISTENCE_ONLY_OPENED
 
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
 
Constructor Summary
ExplorerPanel()
          Deprecated. Default constructor.
ExplorerPanel(ExplorerManager manager)
          Deprecated. Initialize the explorer panel with the provided manager.
 
Method Summary
protected  void componentActivated()
          Deprecated. Activates copy/cut/paste actions.
protected  void componentDeactivated()
          Deprecated. Called when this component is deactivated.
 ExplorerManager getExplorerManager()
          Deprecated. Get the explorer manager.
 HelpCtx getHelpCtx()
          Deprecated. Get context help for an explorer window.
static HelpCtx getHelpCtx(Node[] sel, HelpCtx def)
          Deprecated. Utility method to get context help from a node selection.
static boolean isConfirmDelete()
          Deprecated. Are deletions confirmed on all Explorer panels?
 void open()
          Deprecated. Shows this TopComponent.
 void open(Workspace workspace)
          Deprecated. Shows this TopComponent in current workspace.
 void readExternal(ObjectInput oi)
          Deprecated. Reads the manager.
static void setConfirmDelete(boolean confirmDelete)
          Deprecated. Set whether deletions should have to be confirmed on all Explorer panels.
protected  void updateTitle()
          Deprecated. Called when the explored context changes.
 void writeExternal(ObjectOutput oo)
          Deprecated. Stores the manager
 
Methods inherited from class org.openide.windows.TopComponent
associateLookup, availableModes, cancelRequestAttention, canClose, canClose, close, close, closeNotify, componentClosed, componentHidden, componentOpened, componentShowing, getAccessibleContext, getActions, getActivatedNodes, getCloseOperation, getDisplayName, getIcon, getLookup, getPersistenceType, getRegistry, getSystemActions, getUndoRedo, isOpened, isOpened, openNotify, preferredID, processKeyBinding, requestActive, requestAttention, requestFocus, requestFocusInWindow, requestVisible, setActivatedNodes, setCloseOperation, setDisplayName, setIcon, setName, setToolTipText, toFront, writeReplace
 
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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExplorerPanel

public ExplorerPanel(ExplorerManager manager)
Deprecated. 
Initialize the explorer panel with the provided manager.

Parameters:
manager - the explorer manager to use

ExplorerPanel

public ExplorerPanel()
Deprecated. 
Default constructor. Uses newly created manager.

Method Detail

open

public void open()
Deprecated. 
Description copied from class: TopComponent
Shows this TopComponent. Note: This method only makes it visible, but does not activates it.

Overrides:
open in class TopComponent
See Also:
TopComponent.requestActive()

open

public void open(Workspace workspace)
Deprecated. 
Description copied from class: TopComponent
Shows this TopComponent in current workspace. Node: Currently workspaces are not supported. The method has the same effect like TopComponent.open().

Overrides:
open in class TopComponent

getExplorerManager

public ExplorerManager getExplorerManager()
Deprecated. 
Description copied from interface: ExplorerManager.Provider
Get the explorer manager.

Specified by:
getExplorerManager in interface ExplorerManager.Provider
Returns:
the manager

componentActivated

protected void componentActivated()
Deprecated. 
Activates copy/cut/paste actions.

Overrides:
componentActivated in class TopComponent

componentDeactivated

protected void componentDeactivated()
Deprecated. 
Description copied from class: TopComponent
Called when this component is deactivated. This happens when the parent window of this component loses focus (and this component is the preferred one in the parent), or when this component loses preference in the parent window (and the parent window is focussed). Remember to call the super method. The default implementation does nothing.

Overrides:
componentDeactivated in class TopComponent

updateTitle

protected void updateTitle()
Deprecated. 
Called when the explored context changes. The default implementation updates the title of the window.


getHelpCtx

public HelpCtx getHelpCtx()
Deprecated. 
Get context help for an explorer window. Looks at the manager's node selection.

Specified by:
getHelpCtx in interface HelpCtx.Provider
Overrides:
getHelpCtx in class TopComponent
Returns:
the help context
See Also:
getHelpCtx(Node[],HelpCtx)

getHelpCtx

public static HelpCtx getHelpCtx(Node[] sel,
                                 HelpCtx def)
Deprecated. 
Utility method to get context help from a node selection. Tries to find context helps for selected nodes. If there are some, and they all agree, uses that. In all other cases, uses the supplied generic help.

Parameters:
sel - a list of nodes to search for help in
def - the default help to use if they have none or do not agree
Returns:
a help context

setConfirmDelete

public static void setConfirmDelete(boolean confirmDelete)
Deprecated. 
Set whether deletions should have to be confirmed on all Explorer panels.

Parameters:
confirmDelete - true to confirm, false to delete at once

isConfirmDelete

public static boolean isConfirmDelete()
Deprecated. 
Are deletions confirmed on all Explorer panels?

Returns:
true if they must be confirmed

writeExternal

public void writeExternal(ObjectOutput oo)
                   throws IOException
Deprecated. 
Stores the manager

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class TopComponent
Parameters:
oo - the stream to serialize to
Throws:
IOException

readExternal

public void readExternal(ObjectInput oi)
                  throws IOException,
                         ClassNotFoundException
Deprecated. 
Reads the manager. Deserialization may throw SafeException in case the manager cannot be loaded correctly but the stream is still uncorrupted.

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class TopComponent
Parameters:
oi - the stream to deserialize from
Throws:
IOException
ClassNotFoundException


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.