|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
rcx.rcxtools.filebrowser.ListBrowser
public class ListBrowser
This class is a generic list browser.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary | |
|---|---|
static int |
MULTIPLE
The policy that enables a multiple selection of nodes. |
static int |
SINGLE
This policy that lets just one node selected at the same time. |
| 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 | |
|---|---|
ListBrowser(ListBrowserHandler handler)
Constructs a new ListBrowser with the specified handler. |
|
| Method Summary | |
|---|---|
void |
addNode(java.awt.Image image,
java.awt.Image simage,
java.lang.String name,
java.lang.Object item)
Adds a new node with the specified image, name and client data. |
void |
addNode(java.net.URL url,
java.net.URL surl,
java.lang.String name,
java.lang.Object item)
Adds a new node with the specified url, name and client data. |
void |
addNotify()
|
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
|
ListNode |
getSelectedNode(int index)
Gets the selected node at the specified index. |
int |
getSelectedNodeCount()
Gets the number of selected node in this browser. |
int |
getSelectionPolicy()
Gets the selection policy. |
void |
paint(java.awt.Graphics g)
|
void |
removeAllNodes()
Removes all nodes. |
void |
removeNode(ListNode node)
Removes the specified node. |
void |
setFont(java.awt.Font font)
|
void |
setIncrement(int inc)
Sets the increment before each line to the specified value. |
void |
setSelected(ListNode node,
boolean state)
Sets the specified node selected or not, depending on the specified parameter. |
void |
setSelectionBackgroudColor(java.awt.Color color)
Sets the background color of a selected node to the specified color. |
void |
setSelectionFontColor(java.awt.Color color)
Sets the color of a selected node to the specified color. |
void |
setSelectionPolicy(int policy)
Sets the selection policy. |
void |
setVerticalScrollbar(java.awt.Scrollbar vscroll)
Sets the vertical scroll of this browser to the specified scroll bar. |
void |
unselectAll()
Unselects all selected component. |
void |
update(java.awt.Graphics pg)
|
| Methods inherited from class java.awt.Panel |
|---|
getAccessibleContext |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SINGLE
public static final int MULTIPLE
| Constructor Detail |
|---|
public ListBrowser(ListBrowserHandler handler)
ListBrowser with the specified handler.
handler - the list handler to manage actions| Method Detail |
|---|
public void setIncrement(int inc)
inc - the number of pixels before next line in the list
public void addNode(java.net.URL url,
java.net.URL surl,
java.lang.String name,
java.lang.Object item)
url - the icon urlsurl - the selected icon urlname - the entry nameitem - the client data
public void addNode(java.awt.Image image,
java.awt.Image simage,
java.lang.String name,
java.lang.Object item)
image - the iconsimage - the selected iconname - the entry nameitem - the client datapublic void addNotify()
addNotify in class java.awt.Panelpublic void setVerticalScrollbar(java.awt.Scrollbar vscroll)
vscroll - the scrollbarpublic void setFont(java.awt.Font font)
setFont in class java.awt.Containerpublic void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
adjustmentValueChanged in interface java.awt.event.AdjustmentListenerpublic void update(java.awt.Graphics pg)
update in class java.awt.Containerpublic void paint(java.awt.Graphics g)
paint in class java.awt.Containerpublic void removeNode(ListNode node)
node - the node to removepublic void removeAllNodes()
public int getSelectedNodeCount()
public ListNode getSelectedNode(int index)
index - the index of the selected nodepublic void unselectAll()
public void setSelectionPolicy(int policy)
policy: - SINGLE or MULTIPLEpublic int getSelectionPolicy()
public void setSelectionFontColor(java.awt.Color color)
color - the color used to paint a selected nodepublic void setSelectionBackgroudColor(java.awt.Color color)
color - the color used to paint the background of a selected node
public void setSelected(ListNode node,
boolean state)
node - the nodestate - if true, the node is selected, false implies the node is
unselected
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||