|
|||||||||
| Home >> All >> org >> scopemvc >> view >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.scopemvc.view.swing
Class SList

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JList
org.scopemvc.view.swing.SList
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, ListSelectionParent, java.awt.MenuContainer, java.awt.event.MouseListener, Refreshable, javax.swing.Scrollable, java.io.Serializable, org.scopemvc.core.View
- public class SList
- extends javax.swing.JList
- implements org.scopemvc.core.View, java.awt.event.MouseListener, Refreshable, ListSelectionParent
- extends javax.swing.JList
A JList that uses a SListModel to bind to model properties, and a SListSelectionModel to bind the selected item to a property. Uses a SListCellRenderer to draw items in the list.
SList can issue Controls on selection changes and on double-click.
SList doesn't itself bind to a model: it delegates all binding to its SListModel and SListSelectionModel.
- Version:
- $Revision: 1.8 $ $Date: 2002/01/26 09:46:20 $
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JList |
javax.swing.JList.AccessibleJList |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private java.lang.String |
doubleClickControlID
Control to issue on double click. |
private static org.apache.commons.logging.Log |
LOG
|
private java.lang.String |
selectionControlID
Control to issue on selection change. |
private ValidationHelper |
validationHelper
Helper to manage validation state. |
| 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.Container |
|
| 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 | |
SList()
|
|
| Method Summary | |
protected javax.swing.ListSelectionModel |
createSelectionModel()
Creates the default ListSelectionModel. |
javax.swing.JToolTip |
createToolTip()
Return the toolTip property of this component, creating it and
setting it if it is currently null. |
java.lang.Object |
findElementAt(int inIndex)
Null if not found. |
int |
findIndexFor(java.lang.Object inValue)
-1 if not found. |
java.lang.Object |
getBoundModel()
|
org.scopemvc.core.Controller |
getController()
Don't assign a direct Controller to List, instead delegate to the containing SwingView that has a parent Controller. |
void |
issueChangeSelectionControl()
|
void |
issueControl(org.scopemvc.core.Control inControl)
Don't assign a direct Controller to List, instead delegate to the containing SwingView that has a parent Controller. |
void |
mouseClicked(java.awt.event.MouseEvent e)
This method is called when the mouse is clicked (pressed and released in short succession) on a component. |
void |
mouseEntered(java.awt.event.MouseEvent e)
This method is called when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
This method is called when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent e)
This method is called when the mouse is pressed over a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
This method is called when the mouse is released over a component. |
void |
refresh()
Update the widget with the current state of the bound model. |
void |
refreshSelection()
|
void |
setBoundModel(java.lang.Object inModel)
|
void |
setChangeSelectionControlID(java.lang.String inControlID)
Set the Control ID for the Control that will be issued when the selection is changed. |
void |
setController(org.scopemvc.core.Controller inController)
Don't assign a direct Controller to List, instead delegate to the containing SwingView that has a parent Controller. |
void |
setDoubleClickControlID(java.lang.String inControlID)
Set the Control ID for the Control that will be issued when the List is double-clicked. |
void |
setListModel(java.lang.Object inModel)
Can use this to specify a static list model for the contents of the list rather than binding to a dynamic property of some view model. |
void |
setModel(javax.swing.ListModel model)
Sets the value of the JList.model> JList.model 55 property. |
void |
setRendererIconSelector(org.scopemvc.core.Selector inSelector)
Set the Selector for the list cell renderer to get an Icon: this is the property that will be shown as an Icon in a list cell. |
void |
setRendererIconSelectorString(java.lang.String inSelectorString)
Set the Selector for the list cell renderer to get an Icon: this is the property that will be shown as an Icon in a list cell. |
void |
setRendererSelector(org.scopemvc.core.Selector inSelector)
Set the Selector for the list cell renderer: this is the property that will be shown in a list cell (converted to a String). |
void |
setRendererSelectorString(java.lang.String inSelectorString)
Set the Selector for the list cell renderer: this is the property that will be shown in a list cell (converted to a String). |
void |
setSelectionSelector(org.scopemvc.core.Selector inSelector)
Set the Selector for the list selection: this property will be bound to the list's single selection. |
void |
setSelectionSelectorString(java.lang.String inSelectorString)
Set the Selector for the list selection: this property will be bound to the list's single selection. |
void |
setSelector(org.scopemvc.core.Selector inSelector)
Set the Selector for the list data. |
void |
setSelectorString(java.lang.String inSelectorString)
Set the Selector for the list data. |
void |
setSizeSelector(org.scopemvc.core.Selector inSelector)
Can specify that the list's size comes from a bound property. |
void |
setSizeSelectorString(java.lang.String inSelectorString)
Can specify that the list's size comes from a bound property. |
void |
validationFailed(java.lang.Exception inException)
|
void |
validationSuccess()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.scopemvc.view.swing.ListSelectionParent |
setEnabled |
| Field Detail |
LOG
private static final org.apache.commons.logging.Log LOG
selectionControlID
private java.lang.String selectionControlID
- Control to issue on selection change.
doubleClickControlID
private java.lang.String doubleClickControlID
- Control to issue on double click.
validationHelper
private ValidationHelper validationHelper
- Helper to manage validation state.
| Constructor Detail |
SList
public SList()
| Method Detail |
setModel
public void setModel(javax.swing.ListModel model)
- Description copied from class:
javax.swing.JList - Sets the value of the JList.model>
JList.model55 property. The list's JList.listListener>JList.listListener55 is unsubscribed from the existing model, if it exists, and re-subscribed to the new model.
createSelectionModel
protected javax.swing.ListSelectionModel createSelectionModel()
- Description copied from class:
javax.swing.JList - Creates the default
ListSelectionModel.
findIndexFor
public int findIndexFor(java.lang.Object inValue)
- -1 if not found.
- Specified by:
findIndexForin interfaceListSelectionParent
findElementAt
public java.lang.Object findElementAt(int inIndex)
- Null if not found.
- Specified by:
findElementAtin interfaceListSelectionParent
getBoundModel
public final java.lang.Object getBoundModel()
- Specified by:
getBoundModelin interfaceorg.scopemvc.core.View
setBoundModel
public final void setBoundModel(java.lang.Object inModel)
- Specified by:
setBoundModelin interfaceorg.scopemvc.core.View
setListModel
public void setListModel(java.lang.Object inModel)
- Can use this to specify a static list model for the contents of
the list rather than binding to a dynamic property of some
view model.
setSizeSelector
public void setSizeSelector(org.scopemvc.core.Selector inSelector)
- Can specify that the list's size comes from a bound property.
This is very useful for JavaBeans indexed properties for which
the size is not accessible in any other way.
setSizeSelectorString
public void setSizeSelectorString(java.lang.String inSelectorString)
- Can specify that the list's size comes from a bound property.
This is very useful for JavaBeans indexed properties for which
the size is not accessible in any other way.
setSelector
public final void setSelector(org.scopemvc.core.Selector inSelector)
- Set the Selector for the list data. Should be a java.util.List
or an Object[] or have a "size" property and properties accessible
by an IntIndexedSelector.
setSelectorString
public final void setSelectorString(java.lang.String inSelectorString)
- Set the Selector for the list data. Should be a java.util.List
or an Object[] or have a "size" property and properties accessible
by an IntIndexedSelector.
setSelectionSelector
public final void setSelectionSelector(org.scopemvc.core.Selector inSelector)
- Set the Selector for the list selection: this property will be
bound to the list's single selection.
setSelectionSelectorString
public final void setSelectionSelectorString(java.lang.String inSelectorString)
- Set the Selector for the list selection: this property will be
bound to the list's single selection.
setRendererSelector
public final void setRendererSelector(org.scopemvc.core.Selector inSelector)
- Set the Selector for the list cell renderer: this is the property
that will be shown in a list cell (converted to a String).
setRendererIconSelector
public final void setRendererIconSelector(org.scopemvc.core.Selector inSelector)
- Set the Selector for the list cell renderer to get an Icon: this is the property
that will be shown as an Icon in a list cell.
setRendererSelectorString
public final void setRendererSelectorString(java.lang.String inSelectorString)
- Set the Selector for the list cell renderer: this is the property
that will be shown in a list cell (converted to a String).
setRendererIconSelectorString
public final void setRendererIconSelectorString(java.lang.String inSelectorString)
- Set the Selector for the list cell renderer to get an Icon: this is the property
that will be shown as an Icon in a list cell.
issueChangeSelectionControl
public void issueChangeSelectionControl()
- Specified by:
issueChangeSelectionControlin interfaceListSelectionParent
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is clicked (pressed and released
in short succession) on a component.
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is pressed over a component.
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is released over a component.
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse enters a component.
- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse exits a component.
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
setChangeSelectionControlID
public final void setChangeSelectionControlID(java.lang.String inControlID)
- Set the Control ID for the Control that will be issued when
the selection is changed. If null no Control will be issued.
setDoubleClickControlID
public final void setDoubleClickControlID(java.lang.String inControlID)
- Set the Control ID for the Control that will be issued when
the List is double-clicked. If null no Control will be issued.
setController
public void setController(org.scopemvc.core.Controller inController)
- Don't assign a direct Controller to List, instead delegate
to the containing SwingView that has a parent Controller.
- Specified by:
setControllerin interfaceorg.scopemvc.core.View
getController
public org.scopemvc.core.Controller getController()
- Don't assign a direct Controller to List, instead delegate
to the containing SwingView that has a parent Controller.
- Specified by:
getControllerin interfaceorg.scopemvc.core.View
issueControl
public void issueControl(org.scopemvc.core.Control inControl)
- Don't assign a direct Controller to List, instead delegate
to the containing SwingView that has a parent Controller.
- Specified by:
issueControlin interfaceorg.scopemvc.core.View
refresh
public void refresh()
- Description copied from interface:
Refreshable - Update the widget with the current state of the bound model.
Probably something like this:
Object propertyValue = boundModel.getPropertyValue(); boolean propertyReadOnly = boundModel.getPropertyReadOnly(); updateFromProperty(propertyValue, propertyReadOnly);- Specified by:
refreshin interfaceRefreshable
refreshSelection
public void refreshSelection()
validationFailed
public void validationFailed(java.lang.Exception inException)
- Specified by:
validationFailedin interfaceListSelectionParent
validationSuccess
public void validationSuccess()
- Specified by:
validationSuccessin interfaceListSelectionParent
createToolTip
public javax.swing.JToolTip createToolTip()
- Description copied from class:
javax.swing.JComponent - Return the
toolTipproperty of this component, creating it and setting it if it is currentlynull. This method can be overridden in subclasses which wish to control the exact form of tooltip created.
|
|||||||||
| Home >> All >> org >> scopemvc >> view >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC