| |
|
| com.javujavu.javux.wings.WingComponent com.javujavu.javux.wings.WingList
WingList | public class WingList extends WingComponent implements ItemSelectable(Code) | | A component that displays a list of objects and allows the user to select
one item.
This class is thread safe.
|
HORIZONTAL_WRAP | final public static int HORIZONTAL_WRAP(Code) | | Indicates a layout with cells flowing horizontally then vertically
|
VERTICAL | final public static int VERTICAL(Code) | | Indicates a vertical layout of cells, in a single column
|
VERTICAL_WRAP | final public static int VERTICAL_WRAP(Code) | | Indicates a layout with cells flowing vertically then horizontally
|
focused | protected boolean focused(Code) | | |
selectOnMove | protected boolean selectOnMove(Code) | | |
selectedIndex | protected int selectedIndex(Code) | | |
WingList | public WingList()(Code) | | Creates a new empty list
|
WingList | public WingList(int layout)(Code) | | Creates a list with specified layout
Parameters: layout - list layout |
addItem | public void addItem(Object item)(Code) | | Adds an item to the item list.
It invokes insertItem(item,-1)
Parameters: item - the Object to add to the list |
doLayout | public synchronized void doLayout()(Code) | | |
getItem | public synchronized Object getItem(int index)(Code) | | Returns the list item at the specified index. If index
is out of range (less than zero or greater than or equal to size)
it will return null .
Parameters: index - an integer indicating the list position the Object at that list position; ornull if out of range |
getItemBounds | public synchronized Rectangle getItemBounds(int index)(Code) | | Returns the bounding rectangle, in the list coordinate system,
for the cell specified by the index.
Parameters: index - the index the bounding rectangle for the cell, or null |
getItemCount | public int getItemCount()(Code) | | Returns the number of items in the list.
an integer equal to the number of items in the list |
getSelectedIndex | public int getSelectedIndex()(Code) | | Gets the index of the selected item on the list,
the index of the selected item;if no item is selected -1 is returned. |
getSelectedItem | public synchronized Object getSelectedItem()(Code) | | Gets the selected item on the list.
the selected item on the list;if no item is selected null is returned. |
getSelectedObjects | public Object[] getSelectedObjects()(Code) | | Gets the selected items on the list in an array of Objects.
an array of Object s representing theselected items on the list;if no item is selected, empty array is returned. |
indexOf | public int indexOf(Object item)(Code) | | Returns the index of the first occurrence of the specified item
in this list, or -1 if this list does not contain the item.
Parameters: item - item to search for the index of the first occurrence of the specified item inthis list, or -1 if this list does not contain the item |
insertItem | public synchronized void insertItem(Object item, int index)(Code) | | Inserts an item into the item list at a given index.
This method allows negative index values.
The item with negative index is inserted at getItemCount()+index+1
which means at the end of the list for index = -1
Parameters: item - the Object to add to the list Parameters: index - an integer specifying the position at whichto add the item |
loadSkin | public void loadSkin()(Code) | | Loads skin resources.
styles:
[optional styleID.]list.doc.normal
[optional styleID.]list.doc.disabled
item styles:
[optional styleID.]list.item.normal
[optional styleID.]list.item.dark
[optional styleID.]list.item.disabled
[optional styleID.]list.item.disabled.selected
[optional styleID.]list.item.selected
[optional styleID.]list.item.selected.focused
[optional styleID.]list.item.focused
See Also: Style See Also: WingSkin |
locationToIndex | public synchronized int locationToIndex(Point p)(Code) | | Returns the cell index at the given location in the list
coordinate system.
Parameters: p - the coordinates of the point the cell index at the given location, or -1 |
removeAllItems | public synchronized void removeAllItems()(Code) | | Removes all items from the item list.
|
removeItem | public synchronized void removeItem(int index)(Code) | | Removes the item at index
Parameters: index - an int specifying the index of the item to remove |
removeItem | public synchronized void removeItem(Object item)(Code) | | Removes the first occurrence of an item from the list.
Parameters: item - the item to remove from the list |
scrollToSelected | protected void scrollToSelected()(Code) | |
This method acquire TreeLock
|
selectedByUser | protected void selectedByUser(int index)(Code) | |
This method acquire TreeLock
|
setItemRenderer | public void setItemRenderer(ItemRenderer itemRenderer)(Code) | | Sets the renderer that paints list items.
Parameters: itemRenderer - the ItemRenderer of the list items;use null to reset to default See Also: ItemRenderer See Also: DefaultItemRenderer |
setSelectedIndex | public synchronized void setSelectedIndex(int index)(Code) | | Selects the item at the specified index in the list.
Parameters: index - the position of the item to select |
setSelectedItem | public synchronized void setSelectedItem(Object item)(Code) | | Sets the selected item in the combo box display area to the item in
the argument.
If item is in the list, the display area shows
item selected.
Parameters: item - the list item to select; use null toclear the selection |
Methods inherited from com.javujavu.javux.wings.WingComponent | public void addActionListener(ActionListener l)(Code)(Java Doc) public void addItemListener(ItemListener l)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public void addShortcut(Shortcut s)(Code)(Java Doc) public void addShortcuts(WingComponent source)(Code)(Java Doc) protected void cancelPopup(WingComponent src)(Code)(Java Doc) protected static void clrPopup(WingComponent popup)(Code)(Java Doc) protected void dispatchEventOET(AWTEvent e)(Code)(Java Doc) protected boolean dispatchEventsOET()(Code)(Java Doc) protected void dispatchShortcuts(KeyEvent e)(Code)(Java Doc) protected void doScrollRectToVisible(Rectangle r)(Code)(Java Doc) public static void enablePopups(boolean enableLightweightPopups, boolean enableHeavyweightPopups)(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public String getClipboardText()(Code)(Java Doc) public Font getFont()(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public Frame getParentFrame()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) public ItemRenderer getRenderer()(Code)(Java Doc) public WingRootPane getRootPane()(Code)(Java Doc) public void getScrollIncrements(Point unit, Point block)(Code)(Java Doc) public Style getStyle()(Code)(Java Doc) public Object getTooltipAt(int x, int y)(Code)(Java Doc) public Dimension getViewOrSize()(Code)(Java Doc) public Dimension getViewSize()(Code)(Java Doc) protected Dimension getViewSize(WingComponent child)(Code)(Java Doc) public WingFont getWingFont()(Code)(Java Doc) protected void hideTooltip()(Code)(Java Doc) public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)(Code)(Java Doc) public void invalidate()(Code)(Java Doc) public boolean isFocusTraversable()(Code)(Java Doc) public void loadSkin()(Code)(Java Doc) public void mouseWheelMoved(Object source, int wheelRotation)(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintBackground(Graphics g)(Code)(Java Doc) public void paintComponent(Graphics g)(Code)(Java Doc) public void postOnEventThread(AWTEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) protected void processKeyEvent(KeyEvent e)(Code)(Java Doc) protected void processMouseEvent(MouseEvent e)(Code)(Java Doc) protected void processMouseMotionEvent(MouseEvent e)(Code)(Java Doc) public void removeActionListener(ActionListener l)(Code)(Java Doc) public void removeItemListener(ItemListener l)(Code)(Java Doc) public void removeShortcut(Shortcut s)(Code)(Java Doc) public void removeShortcuts(WingComponent source)(Code)(Java Doc) public void repaintVisible()(Code)(Java Doc) public boolean repaintVisible(int x, int y, int width, int height)(Code)(Java Doc) public void revalidateAndRepaint()(Code)(Java Doc) public void scrollRectToVisible(Rectangle r)(Code)(Java Doc) public void setClipboardText(String text)(Code)(Java Doc) public static void setDebugDelay(int debugDelay)(Code)(Java Doc) public static void setDoubleBuffering(boolean doubleBuffering)(Code)(Java Doc) public void setEnabled(boolean b)(Code)(Java Doc) protected static void setPopup(WingComponent popup)(Code)(Java Doc) public void setPreferredSize(Dimension prefSize)(Code)(Java Doc) public void setRenderer(ItemRenderer renderer)(Code)(Java Doc) public void setStyleId(String styleId)(Code)(Java Doc) public void setTooltip(Object tooltip)(Code)(Java Doc) public void setTopStyle(Style topStyle)(Code)(Java Doc) public void setWingFocusable(boolean focusable)(Code)(Java Doc) protected void showTooltip(Point point)(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) protected void updateShortcuts(WingComponent target, boolean add)(Code)(Java Doc) public static void updateSkin(Container c)(Code)(Java Doc) protected void validateTree()(Code)(Java Doc) public void wingHierarchyChanged(boolean showing)(Code)(Java Doc) public void wingPaint(Graphics g)(Code)(Java Doc) protected void wingProcessActionEvent(ActionEvent e)(Code)(Java Doc) protected void wingProcessItemEvent(ItemEvent e)(Code)(Java Doc) protected void wingProcessKeyEvent(KeyEvent e, WingComponent redirecting)(Code)(Java Doc) protected void wingProcessMouseEvent(MouseEvent e)(Code)(Java Doc) public void wingRequestFocusInWindow()(Code)(Java Doc) protected void wingValidate()(Code)(Java Doc)
|
|
|
|