Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.databinding.viewers
Interface IViewerUpdater


public interface IViewerUpdater

A strategy interface for updating the elements in a StructuredViewer. Many structured viewer classes have similar methods for adding and removing elements, few of which are defined in common ancestor classes. This interface serves as a universal adapter for updating the elements in a viewer

Since:
1.3
See Also:
ObservableListContentProvider.ObservableListContentProvider(IViewerUpdater), ObservableSetContentProvider.ObservableSetContentProvider(IViewerUpdater)

Method Summary
 void add ( Object[] elements)
          Adds the elements to the viewer.
 void insert ( Object element, int position)
          Insert the element into the viewer at the specified position.
 void move ( Object element, int oldPosition, int newPosition)
          Moves the specified element from the specified old position to the specified new position.
 void remove ( Object[] elements)
          Removes the elements from the viewer
 void remove ( Object element, int position)
          Remove the element from the viewer
 void replace ( Object oldElement, Object newElement, int position)
          Replace the specified element at the given position with the new element.
 

Method Detail

insert

void insert(
Object element,
            int position)
Insert the element into the viewer at the specified position.

Parameters:
element - the element to add
position - the position of the element

remove

void remove(
Object element,
            int position)
Remove the element from the viewer

Parameters:
element - the element to remove
position - the position of the element

replace

void replace(
Object oldElement,
             
Object newElement,
             int position)
Replace the specified element at the given position with the new element.

Parameters:
oldElement - the element being replaced
newElement - the element that replaces oldElement
position - the position of the element being replaced.

move

void move(
Object element,
          int oldPosition,
          int newPosition)
Moves the specified element from the specified old position to the specified new position. No action is taken if the viewer has a sorter or filter(s).

Parameters:
element - the element being moved
oldPosition - the position of the element before it is moved
newPosition - the position of the element after it is moved

add

void add(
Object[] elements)
Adds the elements to the viewer.

Parameters:
elements - the elements to add

remove

void remove(
Object[] elements)
Removes the elements from the viewer

Parameters:
elements - the elements to remove

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire