|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectswingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
swingwtx.swing.JList
Nested Class Summary |
Nested classes inherited from class swingwtx.swing.JComponent |
JComponent.InternalFrameSelectionListener |
Field Summary | |
protected ListCellRenderer |
cellRenderer
|
protected ListModel |
listModel
|
protected ListSelectionModel |
listSelectionModel
|
protected org.eclipse.swt.widgets.Table |
ppeer
|
protected int |
pSelectedIndex
|
protected java.lang.String |
pText
|
Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, opaque, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
Fields inherited from class swingwt.awt.Container |
composite, comps, containerListeners, layout, queuedValidateRequest |
Fields inherited from interface swingwt.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JList()
|
|
JList(ListModel model)
|
|
JList(java.lang.Object[] items)
Creates a list with the specified items. |
|
JList(java.util.Vector items)
Creates a list with the specified items. |
Method Summary | |
void |
addItem(java.lang.Object item)
|
void |
addListSelectionListener(ListSelectionListener l)
|
protected boolean |
checkIsDefault()
Ensures the listmodel is an instance of DefaultListModel - returns false if it isn't. |
void |
clearSelection()
|
void |
contentsChanged(ListDataEvent e)
|
ListCellRenderer |
getCellRenderer()
|
java.lang.Object |
getItemAt(int index)
|
int |
getItemCount()
|
ListModel |
getModel()
|
Dimension |
getPreferredScrollableViewportSize()
|
int |
getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
int |
getSelectedIndex()
|
int[] |
getSelectedIndices()
|
java.lang.Object |
getSelectedValue()
|
java.lang.Object[] |
getSelectedValues()
|
ListSelectionModel |
getSelectionModel()
|
protected int |
indexOf(java.lang.Object value)
|
void |
insertItemAt(java.lang.Object item,
int index)
|
void |
intervalAdded(ListDataEvent e)
|
void |
intervalRemoved(ListDataEvent e)
|
protected void |
loadData(java.lang.Object[] data)
|
protected void |
loadData(java.util.Vector data)
|
int |
locationToIndex(Point point)
|
protected void |
registerSelectionEvents()
Assigns events to the peer for selection so that we can update the ListSelectionModel for this component. |
void |
removeAllItems()
|
void |
removeItem(java.lang.Object item)
|
void |
removeItemAt(int index)
|
void |
removeListSelectionListener(ListSelectionListener l)
|
void |
replaceItemAt(java.lang.Object replacement,
int index)
Not a real Swing method - used to switch an already created item in the DefaultListModel. |
void |
setCellRenderer(ListCellRenderer r)
|
void |
setListData(java.lang.Object[] listData)
Fill list model from array |
void |
setListData(java.util.Vector listData)
Fill list model from vector |
void |
setModel(ListModel l)
|
void |
setSelectedIndex(int index)
|
void |
setSelectedIndices(int[] selection)
|
void |
setSelectedValue(int index)
|
void |
setSelectedValue(java.lang.Object value,
boolean shouldscroll)
|
void |
setSelectionBackground(Color color)
No way in SWT to set selection colour models |
void |
setSelectionForeground(Color color)
No way in SWT to set selection colour models |
void |
setSelectionMode(int mode)
|
void |
setSelectionModel(ListSelectionModel l)
|
void |
setSwingWTParent(Container parent)
Once a parent component receives an "add" call for a child, this being the child, this should be called to tell us to instantiate the peer and load in any cached properties. |
void |
setVisibleRowCount(int rows)
Used to calculate preferred height |
void |
showSelection()
Scrolls the list to the selected item. |
protected void |
updateList()
Fills the table with the list items |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.eclipse.swt.widgets.Table ppeer
protected java.lang.String pText
protected int pSelectedIndex
protected ListCellRenderer cellRenderer
protected ListModel listModel
protected ListSelectionModel listSelectionModel
Constructor Detail |
public JList()
public JList(java.lang.Object[] items)
public JList(java.util.Vector items)
public JList(ListModel model)
Method Detail |
public void addListSelectionListener(ListSelectionListener l)
public void removeListSelectionListener(ListSelectionListener l)
public void clearSelection()
public java.lang.Object getSelectedValue()
public void setSelectedValue(int index)
protected int indexOf(java.lang.Object value)
public void setSelectedValue(java.lang.Object value, boolean shouldscroll)
public ListSelectionModel getSelectionModel()
public void setSelectionModel(ListSelectionModel l)
public void setSelectionMode(int mode)
public java.lang.Object[] getSelectedValues()
public void addItem(java.lang.Object item)
public void insertItemAt(java.lang.Object item, int index)
public int getSelectedIndex()
public int[] getSelectedIndices()
public java.lang.Object getItemAt(int index)
public int getItemCount()
public void showSelection()
public void setSelectedIndex(int index)
public void setSelectedIndices(int[] selection)
public void removeAllItems()
public void removeItem(java.lang.Object item)
public void removeItemAt(int index)
public void replaceItemAt(java.lang.Object replacement, int index)
public void setVisibleRowCount(int rows)
public int locationToIndex(Point point)
public void setSelectionBackground(Color color)
public void setSelectionForeground(Color color)
protected void updateList()
public void setListData(java.lang.Object[] listData)
public void setListData(java.util.Vector listData)
protected void loadData(java.util.Vector data)
protected void loadData(java.lang.Object[] data)
public void setCellRenderer(ListCellRenderer r)
public ListCellRenderer getCellRenderer()
public ListModel getModel()
public void setModel(ListModel l)
protected boolean checkIsDefault()
public void setSwingWTParent(Container parent) throws java.lang.Exception
setSwingWTParent
in class JComponent
java.lang.Exception
public void contentsChanged(ListDataEvent e)
contentsChanged
in interface ListDataListener
public void intervalAdded(ListDataEvent e)
intervalAdded
in interface ListDataListener
public void intervalRemoved(ListDataEvent e)
intervalRemoved
in interface ListDataListener
protected void registerSelectionEvents()
public Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface Scrollable
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableBlockIncrement
in interface Scrollable
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface Scrollable
public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in interface Scrollable
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in interface Scrollable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |