WebObjects 5.2.3

com.webobjects.eointerface.cocoa
Class EOCocoaTableViewPlugin

java.lang.Object
  extended bycom.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
      extended bycom.webobjects.eointerface.EOTableAssociation.TablePlugin
          extended bycom.webobjects.eointerface.cocoa.EOCocoaTableViewPlugin
All Implemented Interfaces:
NSDisposable

public class EOCocoaTableViewPlugin
extends EOTableAssociation.TablePlugin

EOCocoaTableViewPlugin is used in Cocoa applications to connect NStableViews to table associations. This plugin coordinates updating and getting values from the NSTableColumns of its table view, as well as reporting which cells are selected.

Usage:
Association classes: EOTableAssociation
Widget classes: NSTableView


Nested Class Summary
 
Nested classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
EOWidgetAssociation.WidgetPlugin.Formatting
 
Constructor Summary
EOCocoaTableViewPlugin(EOWidgetAssociation association, Object widget)
          Creates a new EOCocoaTableViewPlugin for use with association and widget.
 
Method Summary
 EOTableColumnAssociation associationForColumnAtIndex(int columnIndex)
          Deprecated. in the Java EOInterface Cocoa Framework. Don't use this method.
 void breakConnection()
          Tells the plugin to halt communication with its NSTableView object.
 int editingColumnIndex()
          Returns the index of the column currently being edited.
 int editingRowIndex()
          Returns the index of the row currently being edited
 void establishConnection()
          Establishes a connection between the plugin and its UI widget.
 EOTableAssociation existingTableAssociation()
          Returns the table association for this plugin.
 int numberOfColumns()
          Returns the number of columns displayed in the plugin's table view.
 int[] selectionIndexes()
          Returns the selected rows of the plugin's table as an array of indexes.
 EOTableColumnAssociation tableColumnAssociationForColumnAtIndex(int columnIndex)
          Returns the EOTableColumnAssociation that manages the NSTableColumn at index columnIndex in the plugin's NSTableView.
 void updateSelectionIndexes(int[] selectedRowIndexes)
          Selects the rows at indexes selectedRowIndexes in the plugin's table view.
 void updateTableContents(int numberOfRows)
          Forces the plugin to update the contents of its table view.
 String[] widgetKeysTaken()
          Returns an array of Strings that represent outlet names in Interface Builder.
 
Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
association, dispose, unacceptableAspects, widget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOCocoaTableViewPlugin

public EOCocoaTableViewPlugin(EOWidgetAssociation association,
                              Object widget)
Creates a new EOCocoaTableViewPlugin for use with association and widget.

Parameters:
association - EOTableAssociation for this plugin to communicate with
widget - the NSTableView object for this plugin to manage
Method Detail

associationForColumnAtIndex

public EOTableColumnAssociation associationForColumnAtIndex(int columnIndex)
Deprecated. in the Java EOInterface Cocoa Framework. Don't use this method.

Returns the table column association that manages the column at index columnIndex in this plugin's table view.

Parameters:
columnIndex - index of table column in the plugin's table view; 0 is the first column on the left
Returns:
NSTableColumnAssociation for column at index columnIndex in this plugin's NSTableView

breakConnection

public void breakConnection()
Tells the plugin to halt communication with its NSTableView object. This makes sure that actions from the NSTableView don't get to this plugin.

Overrides:
breakConnection in class EOWidgetAssociation.WidgetPlugin

editingColumnIndex

public int editingColumnIndex()
Returns the index of the column currently being edited.

Specified by:
editingColumnIndex in class EOTableAssociation.TablePlugin
Returns:
index of the column currently being edited or -1 if no column is editing

editingRowIndex

public int editingRowIndex()
Returns the index of the row currently being edited

Specified by:
editingRowIndex in class EOTableAssociation.TablePlugin
Returns:
index of the row currently being edited or -1 if no row is editing.

establishConnection

public void establishConnection()
Establishes a connection between the plugin and its UI widget. This makes sure that actions from the NSImageView are sent to this plugin.

Overrides:
establishConnection in class EOWidgetAssociation.WidgetPlugin

existingTableAssociation

public EOTableAssociation existingTableAssociation()
Returns the table association for this plugin. If an EOTableColumnAssociation finishes its establishConnection without its table association being connected, an EOTableAssociation is automatically created and set in the table column association.

Specified by:
existingTableAssociation in class EOTableAssociation.TablePlugin
Returns:
NSTableColumnAssociation for column at index columnIndex in this plugin's NSTableView

numberOfColumns

public int numberOfColumns()
Returns the number of columns displayed in the plugin's table view.

Specified by:
numberOfColumns in class EOTableAssociation.TablePlugin
Returns:
the number of columns displayed in the plugin's NSTableView

selectionIndexes

public int[] selectionIndexes()
Returns the selected rows of the plugin's table as an array of indexes.

Specified by:
selectionIndexes in class EOTableAssociation.TablePlugin
Returns:
an array of indexes of selected rows in the plugin's NSTableView in this plugin's NSTableView

tableColumnAssociationForColumnAtIndex

public EOTableColumnAssociation tableColumnAssociationForColumnAtIndex(int columnIndex)
Returns the EOTableColumnAssociation that manages the NSTableColumn at index columnIndex in the plugin's NSTableView.

Specified by:
tableColumnAssociationForColumnAtIndex in class EOTableAssociation.TablePlugin
Parameters:
columnIndex - index of table column in the plugin's table view; 0 is the first column on the left
Returns:
the table column association of column with index columnIndex

updateSelectionIndexes

public void updateSelectionIndexes(int[] selectedRowIndexes)
Selects the rows at indexes selectedRowIndexes in the plugin's table view. Any previous selection is forgotten.

Specified by:
updateSelectionIndexes in class EOTableAssociation.TablePlugin
Parameters:
selectedRowIndexes - array of row indexes to select

updateTableContents

public void updateTableContents(int numberOfRows)
Forces the plugin to update the contents of its table view.

Specified by:
updateTableContents in class EOTableAssociation.TablePlugin
Parameters:
numberOfRows - ignored

widgetKeysTaken

public String[] widgetKeysTaken()
Returns an array of Strings that represent outlet names in Interface Builder. These outlets are disabled by Interface Builder once the NSImageView is connected to this plugin's association.

EOCocoaTableViewPlugin takes over outlets with keys "delegate" and "dataSource."

Overrides:
widgetKeysTaken in class EOWidgetAssociation.WidgetPlugin
Returns:
String array of outlet names

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.