com.tssap.util.ui.reuse.list
Class ListSelector

java.lang.Object
  |
  +--com.tssap.util.ui.AbstractEditable
        |
        +--com.tssap.util.ui.reuse.GenericComponent
              |
              +--com.tssap.util.ui.reuse.GenericMultiComponent
                    |
                    +--com.tssap.util.ui.reuse.GenericMultiTableComponent
                          |
                          +--com.tssap.util.ui.reuse.list.ListSelector
All Implemented Interfaces:
IEditable, IGenericComponent, IGenericMultiComponent, IGridLayoutPaneContainer, IListSelector, IReuseable

public class ListSelector
extends GenericMultiTableComponent
implements IListSelector

Since:
19.09.2002

Constructor Summary
ListSelector(IListSelectorCallback callback, IListElementGridLayoutPaneContainer gridLayoutPaneContainer)
          Constructor for MutableListSelector.
ListSelector(java.lang.String title, IListSelectorCallback callback, IListElementGridLayoutPaneContainer gridLayoutPaneContainer)
          Constructor for MutableListSelector.
 
Method Summary
 boolean addElement(IListElement listElement)
           
 boolean addElement(java.lang.String value, java.lang.Object userObject)
           
 int addElements(IListElement[] listElements)
           
 boolean changeElement(IListElement listElement, java.lang.String newName, java.lang.Object userObject)
           
 boolean containsElement(IListElement listElement)
          Method containsElement.
 IListSelectorCallback getCallback()
          Returns the callback.
 java.lang.String getDefaultEntry()
          Returns the defaultEntry.
 IListElement getElement(IListElement listElement)
          Method getElement.
 IListElement[] getElements()
          Method getElements.
 IListElementGridLayoutPaneContainer getGridLayoutPaneContainer()
           
 IListElement getSelection()
           
 int getUserGridNumOfColumns()
          Returns number of columns for userArea given to method initContainer(IGridLayoutPane userArea)
 void initContainer(IGridLayoutPane userArea)
          Initialize component's UI.
 boolean isSecurityRemove()
           
 boolean isUserGridEqualColSize()
          Returns true if userArea given to method initContainer(IGridLayoutPane userArea) has to have equal column widths
 void refresh()
          Update component's UI
 void removeAll()
           
 boolean removeElement(IListElement listElement)
           
 int removeElements(IListElement[] listElements)
           
 void setButtonOrientation(int buttonOrientation)
           
 void setCallback(IListSelectorCallback callback)
          Sets the callback.
 void setDefaultEntry(java.lang.String defaultEntry)
          Sets the defaultEntry.
 void setElements(IListElement[] listElements)
           
 void setEnabled(boolean enabled)
          Sets the enabled.
 void setGridLayoutPaneContainer(IListElementGridLayoutPaneContainer gridLayoutPaneContainer)
           
 void setLabelProvider(org.eclipse.jface.viewers.LabelProvider labelProvider)
          Sets the labelProvider.
 void setSecurityRemove(boolean secure)
           
 void setSelection(IListElement listElement)
           
 void setSelection(int elementIndex)
           
 
Methods inherited from class com.tssap.util.ui.reuse.GenericMultiComponent
getAddButtonText, getButtonOrientation, getRemoveButtonText, hasAddRemoveButtons, isSecureRemove, setAddButtonText, setHasAddRemoveButtons, setRemoveButtonText, setSecureRemove
 
Methods inherited from class com.tssap.util.ui.reuse.GenericComponent
addModifyListener, addSelectionListener, createPartControl, createPartControl, createPartControl, getTitle, getUserAreaGridLayoutPane, isComposable, isEnabled, removeModifyListener, removeSelectionListener, setTitle
 
Methods inherited from class com.tssap.util.ui.AbstractEditable
isEditable, setEditable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tssap.util.ui.reuse.list.IListSelector
isEnabled
 
Methods inherited from interface com.tssap.util.ui.reuse.IGenericComponent
addModifyListener, addSelectionListener, createPartControl, createPartControl, getTitle, removeModifyListener, removeSelectionListener, setTitle
 
Methods inherited from interface com.tssap.util.ui.IEditable
isEditable, setEditable
 
Methods inherited from interface com.tssap.util.ui.reuse.IReuseable
createPartControl
 

Constructor Detail

ListSelector

public ListSelector(IListSelectorCallback callback,
                    IListElementGridLayoutPaneContainer gridLayoutPaneContainer)
Constructor for MutableListSelector.

ListSelector

public ListSelector(java.lang.String title,
                    IListSelectorCallback callback,
                    IListElementGridLayoutPaneContainer gridLayoutPaneContainer)
Constructor for MutableListSelector.
Parameters:
title -  
Method Detail

initContainer

public void initContainer(IGridLayoutPane userArea)
Description copied from interface: IGridLayoutPaneContainer
Initialize component's UI. Implementor has to fill the given grid layout pane. The number of columns comes from call to method getUserGridNumOfColumns(). If grid columns have equal widths is decided through call to isUserGridEqualColSize().
Specified by:
initContainer in interface IGridLayoutPaneContainer
Overrides:
initContainer in class GenericMultiTableComponent
See Also:
IGridLayoutPaneContainer.initContainer(IGridLayoutPane)

getUserGridNumOfColumns

public int getUserGridNumOfColumns()
Description copied from interface: IGridLayoutPaneContainer
Returns number of columns for userArea given to method initContainer(IGridLayoutPane userArea)
Specified by:
getUserGridNumOfColumns in interface IGridLayoutPaneContainer
Overrides:
getUserGridNumOfColumns in class GenericMultiTableComponent
See Also:
IGridLayoutPaneContainer.getUserGridNumOfColumns()

isUserGridEqualColSize

public boolean isUserGridEqualColSize()
Description copied from interface: IGridLayoutPaneContainer
Returns true if userArea given to method initContainer(IGridLayoutPane userArea) has to have equal column widths
Specified by:
isUserGridEqualColSize in interface IGridLayoutPaneContainer
Overrides:
isUserGridEqualColSize in class GenericMultiTableComponent
See Also:
IGridLayoutPaneContainer.isUserGridEqualColSize()

getDefaultEntry

public java.lang.String getDefaultEntry()
Returns the defaultEntry.
Returns:
String

setDefaultEntry

public void setDefaultEntry(java.lang.String defaultEntry)
Sets the defaultEntry.
Parameters:
defaultEntry - The defaultEntry to set

getCallback

public IListSelectorCallback getCallback()
Returns the callback.
Specified by:
getCallback in interface IListSelector
Returns:
IListSelectorCallback

setCallback

public void setCallback(IListSelectorCallback callback)
Sets the callback.
Specified by:
setCallback in interface IListSelector
Parameters:
callback - The callback to set

isSecurityRemove

public boolean isSecurityRemove()
Specified by:
isSecurityRemove in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#isSecurityRemove()

setSecurityRemove

public void setSecurityRemove(boolean secure)
Specified by:
setSecurityRemove in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#setSecurityRemove(boolean)

getGridLayoutPaneContainer

public IListElementGridLayoutPaneContainer getGridLayoutPaneContainer()
Specified by:
getGridLayoutPaneContainer in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#getGridLayoutPaneContainer()

setGridLayoutPaneContainer

public void setGridLayoutPaneContainer(IListElementGridLayoutPaneContainer gridLayoutPaneContainer)
Specified by:
setGridLayoutPaneContainer in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#setGridLayoutPaneContainer(IListElementGridLayoutPaneContainer)

setButtonOrientation

public void setButtonOrientation(int buttonOrientation)
Overrides:
setButtonOrientation in class GenericMultiComponent
See Also:
IGenericMultiComponent.setButtonOrientation(int)

getElement

public IListElement getElement(IListElement listElement)
Method getElement.
Parameters:
listElement -  
Returns:
IListElement

getElements

public IListElement[] getElements()
Method getElements.
Specified by:
getElements in interface IListSelector
Returns:
IListElement[]

containsElement

public boolean containsElement(IListElement listElement)
Method containsElement.
Specified by:
containsElement in interface IListSelector
Parameters:
listElement -  
Returns:
boolean

removeElement

public boolean removeElement(IListElement listElement)
Specified by:
removeElement in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#removeElement(IListElement)

removeElements

public int removeElements(IListElement[] listElements)
Specified by:
removeElements in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#removeElements(IListElement[])

removeAll

public void removeAll()
Specified by:
removeAll in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#removeAll()

setElements

public void setElements(IListElement[] listElements)
Specified by:
setElements in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#setElements(IListElement[])

changeElement

public boolean changeElement(IListElement listElement,
                             java.lang.String newName,
                             java.lang.Object userObject)
Specified by:
changeElement in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#changeElement(Object, String)

addElement

public boolean addElement(java.lang.String value,
                          java.lang.Object userObject)
Specified by:
addElement in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#addElement(Object, String)

addElements

public int addElements(IListElement[] listElements)
Specified by:
addElements in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#addElements(IListElement[])

addElement

public boolean addElement(IListElement listElement)
Specified by:
addElement in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#addElement(IListElement)

getSelection

public IListElement getSelection()
Specified by:
getSelection in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#getSelection()

setSelection

public void setSelection(IListElement listElement)
Specified by:
setSelection in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#setSelection(IListElement)

setSelection

public void setSelection(int elementIndex)
Specified by:
setSelection in interface IListSelector
See Also:
com.tssap.util.ui.reuse.list.IMutableListSelector#setSelection(int)

refresh

public void refresh()
Description copied from interface: IGenericComponent
Update component's UI
Specified by:
refresh in interface IGenericComponent
Overrides:
refresh in class GenericComponent
See Also:
IGenericComponent.refresh()

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled.
Specified by:
setEnabled in interface IListSelector
Overrides:
setEnabled in class GenericMultiTableComponent
Parameters:
enabled - The enabled to set

setLabelProvider

public void setLabelProvider(org.eclipse.jface.viewers.LabelProvider labelProvider)
Sets the labelProvider.
Specified by:
setLabelProvider in interface IListSelector
Parameters:
labelProvider - The labelProvider to set


Copyright © 2005 SAP AG. All Rights Reserved.