com.sage.accpac.sm
Class ViewFieldPresentationList

java.lang.Object
  extended by com.sage.accpac.sm.ViewFieldPresentationList

@ThreadSafe
public final class ViewFieldPresentationList
extends java.lang.Object

Provides access to the presentation list that is exposed by a field in a Sage Accpac view. You can get an instance of this class by calling ViewField.getPresentationList(). An instance of this class represents the presentation list at the time you make that call; it does not change dynamically to reflect anything happening in the view.

Thread safety
Thread-safe

Method Summary
 int getCount()
          Gets the number of presentation items defined in the list
 java.lang.String getFieldString()
          Gets the display string defined for the current field value
 ViewField getParent()
          Field object to which the presentation list belongs
 java.lang.String getPredefinedString(int index)
          Gets the predefined display string of a presentation item according to the zero-base index in the list.
 java.lang.Object getPredefinedValue(int index)
          Gets the predefined value of a presentation item according to the zero-based index in the list.
 void refresh()
          Refreshes the presentation list from the underlying view.
 int setFieldValue(int index)
          Sets the current field value as the predefined value of the specified presentation item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCount

public int getCount()
Gets the number of presentation items defined in the list


getFieldString

public java.lang.String getFieldString()
Gets the display string defined for the current field value


getParent

public ViewField getParent()
Field object to which the presentation list belongs


getPredefinedString

public java.lang.String getPredefinedString(int index)
Gets the predefined display string of a presentation item according to the zero-base index in the list.

Parameters:
index - the zero-based index that identifies the presentation item

getPredefinedValue

public java.lang.Object getPredefinedValue(int index)
Gets the predefined value of a presentation item according to the zero-based index in the list.

Parameters:
index - the zero-based index that identifies the presentation item

refresh

public void refresh()
Refreshes the presentation list from the underlying view. Applications should call this method to refresh the list if the field attributes indicate that the presentation information may change. Refreshing the list ensures it retrieves the most current presentation list as of the current view state.


setFieldValue

public int setFieldValue(int index)
Sets the current field value as the predefined value of the specified presentation item. The presentation item is identified by the zero-based index in the presentation list.

Parameters:
index - The zero-based index that identifies the presentation item in the list.


Copyright © 2010 Sage Software, Inc. All rights reserved.