Cytoscape 2.2 (c) 2004 ISB, MSKCC, UCSD

cytoscape.view.cytopanels
Interface CytoPanel

All Known Implementing Classes:
CytoPanelImp

public interface CytoPanel

Interface to a CytoPanel.

Author:
Ben Gross.

Method Summary
 Component add(Component component)
          Adds a component to the CytoPanel.
 Component add(Component component, int index)
          Adds a component to the CytoPanel at specified index.
 Component add(String title, Component component)
          Adds a component to the CytoPanel with a specified title.
 void add(String title, Icon icon, Component component)
          Adds a component to the CytoPanel with specified title and icon.
 void add(String title, Icon icon, Component component, String tip)
          Adds a component to the CytoPanel with specified title, icon, and tool tip.
 void addCytoPanelListener(CytoPanelListener cytoPanelListener)
          Adds a CytoPanel listener.
 int getCytoPanelComponentCount()
          Returns the number of components in the CytoPanel.
 Component getSelectedComponent()
          Returns the currently selected component.
 int getSelectedIndex()
          Returns the currently selected index.
 CytoPanelState getState()
          Gets the state of the CytoPanel.
 String getTitle()
          Returns the title of the CytoPanel.
 int indexOfComponent(Component component)
          Returns the index for the specified component.
 int indexOfComponent(String title)
          Returns the first Component index with given title.
 void remove(Component component)
          Removes specified component from the CytoPanel.
 void remove(int index)
          Removes the component from the CytoPanel at the specified index.
 void removeAll()
          Removes all the components from the CytoPanel.
 void removeCytoPanelListener(CytoPanelListener cytoPanelListener)
          Removes a CytoPanel listener.
 void setSelectedIndex(int index)
          Sets the selected index on the CytoPanel.
 void setState(CytoPanelState cytoPanelState)
          Sets the state of the CytoPanel.
 

Method Detail

add

public Component add(Component component)
Adds a component to the CytoPanel.

Parameters:
component - Component reference.
Returns:
component Component reference.

add

public Component add(Component component,
                     int index)
Adds a component to the CytoPanel at specified index.

Parameters:
component - Component reference.
index - Component index.
Returns:
component Component reference.

add

public Component add(String title,
                     Component component)
Adds a component to the CytoPanel with a specified title.

Parameters:
title - Component title.
component - Component reference.
Returns:
component Component reference.

add

public void add(String title,
                Icon icon,
                Component component)
Adds a component to the CytoPanel with specified title and icon.

Parameters:
title - Component title (can be null).
icon - Component icon (can be null).
component - Component reference.

add

public void add(String title,
                Icon icon,
                Component component,
                String tip)
Adds a component to the CytoPanel with specified title, icon, and tool tip.

Parameters:
title - Component title (can be null).
icon - Component icon (can be null).
component - Component reference.
tip - Component Tool tip text.

getTitle

public String getTitle()
Returns the title of the CytoPanel.

Returns:
String Title.

getCytoPanelComponentCount

public int getCytoPanelComponentCount()
Returns the number of components in the CytoPanel.

Returns:
int Number of components.

getSelectedComponent

public Component getSelectedComponent()
Returns the currently selected component.

Returns:
component Currently selected Component reference.

getSelectedIndex

public int getSelectedIndex()
Returns the currently selected index.

Returns:
index Currently selected index.

getState

public CytoPanelState getState()
Gets the state of the CytoPanel.

Returns:
A CytoPanelState.

indexOfComponent

public int indexOfComponent(Component component)
Returns the index for the specified component.

Parameters:
component - Component reference.
Returns:
int Index of the Component or -1 if not found.

indexOfComponent

public int indexOfComponent(String title)
Returns the first Component index with given title.

Parameters:
title - Component title.
Returns:
int Component index with given title or -1 if not found.

remove

public void remove(Component component)
Removes specified component from the CytoPanel.

Parameters:
component - Component reference.

remove

public void remove(int index)
Removes the component from the CytoPanel at the specified index.

Parameters:
index - Component index.

removeAll

public void removeAll()
Removes all the components from the CytoPanel.


setSelectedIndex

public void setSelectedIndex(int index)
Sets the selected index on the CytoPanel.

Parameters:
index - The desired index.

setState

public void setState(CytoPanelState cytoPanelState)
Sets the state of the CytoPanel.

Parameters:
cytoPanelState - A CytoPanelState.

addCytoPanelListener

public void addCytoPanelListener(CytoPanelListener cytoPanelListener)
Adds a CytoPanel listener.

Parameters:
cytoPanelListener - Reference to a CytoPanelListener.

removeCytoPanelListener

public void removeCytoPanelListener(CytoPanelListener cytoPanelListener)
Removes a CytoPanel listener.

Parameters:
cytoPanelListener - Reference to a CytoPanelListener.

www.cytoscape.org