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

ListPane (NetBeans UI Utilities API) - NetBeans API Javadoc 5.5.0

org.openide.awt 6.7.22

org.openide.awt
Class ListPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JList
                  extended by org.openide.awt.ListPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

Deprecated. This class does nothing interesting which cannot be done in a more reliable, scalable way with a JTable.

public class ListPane
extends JList

ListPane. This component is derived from JList component and enables list objects in several columns.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JList
JList.AccessibleJList
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JList
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP
 
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
ListPane()
          Deprecated. Constructs a JList with an empty model.
ListPane(ListModel dataModel)
          Deprecated. Construct a JList that displays the elements in the specified, non-null model.
ListPane(Object[] listData)
          Deprecated. Construct a JList that displays the elements in the specified array.
ListPane(Vector listData)
          Deprecated. Construct a JList that displays the elements in the specified Vector.
 
Method Summary
 void addSelectionInterval(int anchor, int lead)
          Deprecated.  
 void ensureIndexIsVisible(int index)
          Deprecated. If this JList is being displayed withing a JViewport and the specified cell isn't completely visible, scroll the viewport.
 Rectangle getCellBounds(int index1, int index2)
          Deprecated. Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
 Dimension getMinimumSize()
          Deprecated.  
 Dimension getPreferredScrollableViewportSize()
          Deprecated. Compute the size of the viewport needed to display visibleRowCount rows.
 Dimension getPreferredSize()
          Deprecated. The preferredSize of a list is total height of the rows and the maximum width of the cells.
 int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
          Deprecated.  
 boolean getScrollableTracksViewportHeight()
          Deprecated. If this JList is displayed in a JViewport, don't change its height when the viewports height changes.
 boolean getScrollableTracksViewportWidth()
          Deprecated. If this JList is displayed in a JViewport, don't change its width when the viewports width changes.
 int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
          Deprecated. If we're scrolling downwards (direction is greater than 0), and the first row is completely visible with respect to visibleRect, then return its height.
 int getVisibleColumnCount()
          Deprecated. Return the value of the visibleRowCount property.
 Point indexToLocation(int index)
          Deprecated. Returns the origin of the specified item in JList coordinates, null if index isn't valid.
 boolean isOpaque()
          Deprecated. JList components are always opaque.
 int locationToIndex(Point location)
          Deprecated. Convert a point in JList coordinates to the index of the cell at that location.
protected  void paintBackground(Graphics g)
          Deprecated. If the list is opaque, paint its background.
protected  void paintComponent(Graphics g)
          Deprecated. Paint the rows that intersect the Graphics objects clipRect.
 void removeSelectionInterval(int index0, int index1)
          Deprecated.  
 void setSelectionInterval(int anchor, int lead)
          Deprecated.  
 void setVisibleColumnCount(int visibleColumnCount)
          Deprecated. Set the preferred number of rows in the list that are visible within the nearest JViewport ancestor, if any.
 
Methods inherited from class javax.swing.JList
addListSelectionListener, clearSelection, createSelectionModel, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellRenderer, getDragEnabled, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getNextMatch, getPrototypeCellValue, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getToolTipText, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, isSelectedIndex, isSelectionEmpty, paramString, removeListSelectionListener, setCellRenderer, setDragEnabled, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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

ListPane

public ListPane(ListModel dataModel)
Deprecated. 
Construct a JList that displays the elements in the specified, non-null model. All JList constructors delegate to this one.


ListPane

public ListPane(Object[] listData)
Deprecated. 
Construct a JList that displays the elements in the specified array. This constructor just delegates to the ListModel constructor.


ListPane

public ListPane(Vector listData)
Deprecated. 
Construct a JList that displays the elements in the specified Vector. This constructor just delegates to the ListModel constructor.


ListPane

public ListPane()
Deprecated. 
Constructs a JList with an empty model.

Method Detail

isOpaque

public boolean isOpaque()
Deprecated. 
JList components are always opaque.

Overrides:
isOpaque in class JComponent
Returns:
true

getVisibleColumnCount

public int getVisibleColumnCount()
Deprecated. 
Return the value of the visibleRowCount property.

See Also:
JList.setVisibleRowCount(int)

setVisibleColumnCount

public void setVisibleColumnCount(int visibleColumnCount)
Deprecated. 
Set the preferred number of rows in the list that are visible within the nearest JViewport ancestor, if any. The value of this property only affects the value of the JLists preferredScrollableViewportSize.

The default value of this property is 8.

This is a JavaBeans bound property.

See Also:
JList.getVisibleRowCount(), JComponent.getVisibleRect()

ensureIndexIsVisible

public void ensureIndexIsVisible(int index)
Deprecated. 
If this JList is being displayed withing a JViewport and the specified cell isn't completely visible, scroll the viewport.

Overrides:
ensureIndexIsVisible in class JList
Parameters:
index - The index of the cell to make visible
See Also:
JComponent.scrollRectToVisible(java.awt.Rectangle), JComponent.getVisibleRect()

locationToIndex

public int locationToIndex(Point location)
Deprecated. 
Convert a point in JList coordinates to the index of the cell at that location. Returns -1 if there's no cell the specified location.

Overrides:
locationToIndex in class JList
Parameters:
location - The JList relative coordinates of the cell
Returns:
The index of the cell at location, or -1.

indexToLocation

public Point indexToLocation(int index)
Deprecated. 
Returns the origin of the specified item in JList coordinates, null if index isn't valid.

Overrides:
indexToLocation in class JList
Parameters:
index - The index of the JList cell.
Returns:
The origin of the index'th cell.

getCellBounds

public Rectangle getCellBounds(int index1,
                               int index2)
Deprecated. 
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.

Overrides:
getCellBounds in class JList
Parameters:
index1 - start index of the JList cell.
index2 - end index of the JList cell.
Returns:
The bounds of the index'th cell.

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Deprecated. 
Compute the size of the viewport needed to display visibleRowCount rows. This is trivial if fixedCellWidth and fixedCellHeight were specified. Note that they can specified implicitly with the prototypeCellValue property. If fixedCellWidth wasn't specified, it's computed by finding the widest list element. If fixedCellHeight wasn't specified then we resort to heuristics:
  • If the model isn't empty we just multiply the height of the first row by visibleRowCount.
  • If the model is empty, i.e. JList.getModel().getSize() == 0, then we just allocate 16 pixels per visible row, and 100 pixels for the width (unless fixedCellWidth was set), and hope for the best.

Specified by:
getPreferredScrollableViewportSize in interface Scrollable
Overrides:
getPreferredScrollableViewportSize in class JList
See Also:
getPreferredScrollableViewportSize()

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Deprecated. 
If we're scrolling downwards (direction is greater than 0), and the first row is completely visible with respect to visibleRect, then return its height. If we're scrolling downwards and the first row is only partially visible, return the height of the visible part of the first row. Similarly if we're scrolling upwards we return the height of the row above the first row, unless the first row is partially visible.

Specified by:
getScrollableUnitIncrement in interface Scrollable
Overrides:
getScrollableUnitIncrement in class JList
Returns:
The distance to scroll to expose the next or previous row.
See Also:
Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Deprecated. 
Specified by:
getScrollableBlockIncrement in interface Scrollable
Overrides:
getScrollableBlockIncrement in class JList
Returns:
The visibleRect.height or visibleRect.width per the orientation.
See Also:
Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Deprecated. 
If this JList is displayed in a JViewport, don't change its width when the viewports width changes. This allows horizontal scrolling if the JViewport is itself embedded in a JScrollPane.

Specified by:
getScrollableTracksViewportWidth in interface Scrollable
Overrides:
getScrollableTracksViewportWidth in class JList
Returns:
False - don't track the viewports width.
See Also:
Scrollable.getScrollableTracksViewportWidth()

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Deprecated. 
If this JList is displayed in a JViewport, don't change its height when the viewports height changes. This allows vertical scrolling if the JViewport is itself embedded in a JScrollPane.

Specified by:
getScrollableTracksViewportHeight in interface Scrollable
Overrides:
getScrollableTracksViewportHeight in class JList
Returns:
False - don't track the viewports width.
See Also:
Scrollable.getScrollableTracksViewportWidth()

paintBackground

protected void paintBackground(Graphics g)
Deprecated. 
If the list is opaque, paint its background. Subclasses may want to override this method rather than paint().

See Also:
JComponent.paint(java.awt.Graphics)

paintComponent

protected void paintComponent(Graphics g)
Deprecated. 
Paint the rows that intersect the Graphics objects clipRect. This method calls paintBackground and paintCell as necessary. Subclasses may want to override these methods.

Overrides:
paintComponent in class JComponent
See Also:
paintBackground(java.awt.Graphics)

getPreferredSize

public Dimension getPreferredSize()
Deprecated. 
The preferredSize of a list is total height of the rows and the maximum width of the cells. If JList.fixedCellHeight is specified then the total height of the rows is just (cellVerticalMargins + fixedCellHeight) * model.getSize() where rowVerticalMargins is the space we allocate for drawing the yellow focus outline. Similarly if JListfixedCellWidth is specified then we just use that plus the horizontal margins.

Overrides:
getPreferredSize in class JComponent
Returns:
The total size of the

getMinimumSize

public Dimension getMinimumSize()
Deprecated. 
Overrides:
getMinimumSize in class JComponent
Returns:
the size of one cell

setSelectionInterval

public void setSelectionInterval(int anchor,
                                 int lead)
Deprecated. 
Overrides:
setSelectionInterval in class JList

addSelectionInterval

public void addSelectionInterval(int anchor,
                                 int lead)
Deprecated. 
Overrides:
addSelectionInterval in class JList

removeSelectionInterval

public void removeSelectionInterval(int index0,
                                    int index1)
Deprecated. 
Overrides:
removeSelectionInterval in class JList

org.openide.awt 6.7.22

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